Katkat

practice a little every day, paws crossed ♡

Coding & Algorithms Interview Questions

Practice 9403 coding, system design and machine learning questions from 546 companies, sorted by role, topic and interview round. Every question has step-by-step hints, a code runner that supports 8 languages and an AI mentor; members also get the full solution walkthrough.

9403
Questions
546
Companies
11
Topics
8
Languages

Showing 1–30 of 1080 results

  • AMDMediumSoftware Engineer
    Find the Largest K Elements with Partitioning

    Find the largest k occurrences with partition-based selection, sort only the output, and compare quickselect pivot risks with heap and full-sort alternatives.

    Coding & AlgorithmsOnsite
  • AdobeMediumMachine Learning Engineer
    Determine if a multiple-sum subarray exists

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Determine if a multiple-sum subarray exists states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsOnsite
  • AdobeMediumSoftware Engineer
    Find the Lowest Common Ancestor Only When Both Nodes Exist

    Return the lowest common ancestor of two target values only when both are present in a potentially skewed binary tree. Handle absent targets, equal targets, empty input, and cases where one target is the ancestor.

    Coding & AlgorithmsOnsite
  • AdobeMediumSoftware Engineer
    Return a Binary Tree in Level Order

    Return a binary tree's values grouped by depth in level order while preserving left-to-right order within each level. Handle empty, repeated-value, skewed, and very large trees without changing the requested nested output shape.

    Coding & AlgorithmsOnsite
  • AffirmHardSoftware Engineer
    Compute Balances and Minimize Settlements

    Tests transaction aggregation into net balances and combinatorial optimization (backtracking/bitmask DP) to find the minimum number of settlement transfers needed to clear all debts.

    Coding & AlgorithmsOnsiteDynamic ProgrammingBacktrackingBitmask
  • AffirmEasySoftware Engineer
    Implement an LRU cache

    This question tests the ability to combine a hash map and a doubly linked list to achieve constant-time performance for both data retrieval and update operations in a cache.

    Coding & AlgorithmsOnsiteHash MapLinked ListDesign
  • AirbnbMediumSoftware Engineer
    Allocate an Order from the Oldest Inventory Batches

    Implement a function to allocate an order across inventory batches using FIFO (oldest timestamp first, with batch ID tie-breaker), returning allocation details and any unfilled quantity without mutating the input.

    Coding & AlgorithmsOnsitesortinggreedyarrays
  • AirbnbMediumSoftware Engineer
    Allocate refund across payments

    This question evaluates algorithm design and data-structure selection skills, focusing on greedy allocation, ordering by priority and recency, aggregation of transaction amounts, and analysis of time complexity.

    Coding & AlgorithmsOnsite
  • AirbnbMediumSoftware Engineer
    Compute board-game score from regions

    This problem tests your ability to identify connected components in a 2D grid using graph traversal (BFS/DFS) and aggregate properties associated with those components.

    Coding & AlgorithmsOnsiteGraph TraversalBFSDFS
  • AirbnbHardSoftware Engineer
    Count Consecutive Positive Integer Sums

    Count representations of a positive integer as one or more consecutive positive integers, including the one-term representation. Derive the arithmetic condition for each sequence length and use a square-root bound rather than testing every possible starting value.

    Coding & AlgorithmsOnsite
  • AirbnbMediumSoftware Engineer
    Design mutable sum-tree with fast queries

    This question evaluates proficiency in designing dynamic data structures for mutable rooted trees, including maintenance of subtree sums, parent/child link management, and analysis of update and query complexities within the Coding & Algorithms domain; it emphasizes practical application of algorithmic design coupled with conceptual understanding of invariants and amortized complexity. It is commonly asked in technical interviews because it probes reasoning about correctness and performance under mutations, handling edge cases such as subtree deletion and reattachment, and the ability to specify algorithmic approaches and complexity guarantees rather than implementation details.

    Coding & AlgorithmsOnsite
  • AirbnbHardSoftware Engineer
    Detect overlap of two linked lists with cycles

    This problem tests your ability to detect if two linked lists merge, specifically when they may contain cycles, by requiring logic to identify loop entry points and intersection nodes.

    Coding & AlgorithmsOnsiteLinked ListTwo PointersCycle Detection
  • AirbnbMediumSoftware Engineer
    Find palindrome-forming string pairs

    This question evaluates string-processing and algorithmic design skills, including knowledge of efficient lookup data structures, palindrome properties, handling of edge cases, and time/space complexity analysis.

    Coding & AlgorithmsOnsite
  • AirbnbMediumSoftware Engineer
    Find smallest permutation under constraints

    This problem tests your ability to manipulate digits and understand greedy strategies to construct the smallest possible number after applying specific constraints.

    Coding & AlgorithmsOnsiteGreedyRecursionStrings
  • AirbnbHardSoftware Engineer
    Flatten a Nested Integer List

    Flatten an arbitrarily deep mixture of integers and lists while preserving left-to-right order. The challenge emphasizes an iterative stack solution that handles empty lists, very deep nesting, and up to 200,000 nodes without mutating the input.

    Coding & AlgorithmsOnsite
  • AirbnbMediumSoftware Engineer
    Maximize profit from non-overlapping jobs

    This question evaluates proficiency in weighted interval scheduling, dynamic programming concepts, and the use of efficient data structures for large-scale scheduling problems, including handling duplicate times, large reward values, and memory constraints.

    Coding & AlgorithmsOnsite
  • AirbnbHardSoftware Engineer
    Maximize sum with no adjacent tree nodes

    This problem tests your ability to use tree-based dynamic programming to solve an optimization challenge where you must select a subset of nodes with no two being adjacent, while maximizing the sum of their values.

    Coding & AlgorithmsOnsiteTree DPRecursionDFS
  • AirbnbMediumMachine Learning Engineer
    Minimize exact layover bookings

    This problem tests your ability to use dynamic programming to determine if a specific target sum can be achieved using a subset of given item values and how to find the minimum subset size that hits that target.

    Coding & AlgorithmsOnsiteDynamic ProgrammingOptimizationAlgorithms
  • AirbnbMediumMachine Learning Engineer
    Redact Document Phrases with Simultaneous Replacement

    Redact document phrases with a replacement map, whole-word matching, longest-match overlap rules, and one-pass replacement of original text.

    Coding & AlgorithmsOnsite
  • AirbnbMediumSoftware Engineer
    Render Wrapped Paragraphs Inside One Text Box

    Implement a text formatting utility that wraps multiple paragraphs at distinct per-paragraph widths and renders them inside a single, uniformly padded ASCII border box.

    Coding & AlgorithmsOnsiteStringGreedyImplementation
  • AirbnbMediumSoftware Engineer
    Review Python geodata code

    This question evaluates proficiency in Python code review and geolocation data-processing, including competencies in readability, correctness, performance optimization, and architectural scalability.

    Coding & AlgorithmsOnsite
  • AirbnbMediumMachine Learning Engineer
    Solve Decimal Coin Change

    This question evaluates proficiency in dynamic programming for coin-change problems and competency in numerical precision and safe handling of decimal monetary values in algorithmic implementations.

    Coding & AlgorithmsOnsite
  • AirbnbMediumSoftware Engineer
    Solve Linked-List and Iterator Problems

    This question evaluates proficiency in linked-list pointer reasoning, cycle detection and shared-reference identification, as well as iterator design for round-robin merging, testing data-structure manipulation, iterator interfaces, and complexity analysis within the Coding & Algorithms domain.

    Coding & AlgorithmsOnsite
  • AirbnbHardSoftware Engineer
    Solve a Two-by-Three Sliding Puzzle

    Find the minimum moves needed to solve a 2-by-3 sliding puzzle, or report that the target is unreachable. Model each arrangement as a compact graph state, generate legal swaps involving the blank, and use breadth-first search without revisiting configurations.

    Coding & AlgorithmsOnsite
  • AirbnbMediumSoftware Engineer
    Solve palindrome pairs and key path

    This pair of problems evaluates proficiency with string-processing algorithms and advanced data structures for matching, alongside state-space graph search techniques and state-encoding strategies.

    Coding & AlgorithmsOnsite
  • AirtableMediumSoftware Engineer
    Count business days excluding holidays

    This problem tests date manipulation skills and the ability to efficiently calculate working day durations while accounting for dynamic holiday schedules.

    Coding & AlgorithmsOnsiteAlgorithmsDate-TimeOptimization
  • AirtableMediumSoftware Engineer
    Implement BFS serializer and deserializer

    This question evaluates the skill of serializing and deserializing Python object graphs using BFS, including handling primitives, dictionaries, shared subobjects, and circular references while preserving object identity.

    Coding & AlgorithmsOnsite
  • AmazonHardSoftware Engineer
    Build a Searchable Sentence Index

    This problem tests your ability to design an in-memory inverted index for text retrieval, requiring efficient tokenization, case-insensitive mapping, and dynamic updates to a collection of sentences.

    Coding & AlgorithmsOnsiteHash MapsInverted IndexData Structures
  • AmazonMediumData Scientist
    Calculate 7-Day Rolling Average for Energy Consumption

    This question evaluates programming fluency in numerical data processing and algorithmic implementation for computing moving averages and handling edge cases in time-series sequences, and it applies to Data Scientist roles while falling under the Coding & Algorithms category.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Check path in N-ary tree

    This question evaluates understanding of tree traversal and sequence matching in N-ary trees, including handling non-unique node values and maintaining traversal state across branches.

    Coding & AlgorithmsOnsite