KatInterview

practice a little every day — you've got this ♡

Coding Interview Problems

Practice 6008 original coding, SQL, system design, machine learning and behavioral problems across 15 topics. Coding and SQL problems run against hidden test cases right in your browser; every problem has hints and a worked solution, free.

6008
Problems
2226
Auto-graded
15
Topics
273
Added today

Showing 2101–2130 of 2780 results

  • Data Structure DesignHardAuto-graded
    Multicore Thermal Simulation with Adaptive Cooling Selection

    Tests discrete-event simulation skills: delayed load semantics, proportional passive cooling with vibration penalties, fixed-point active cooling selection, and transition-only status reporting.

    Data Structure Designsimulationstate-machinefixed-point
  • Data Structure DesignMediumModel answer
    Async Query Client for a Cloud Data Warehouse

    Design and implement a lightweight client that submits async SQL queries, polls for status, retrieves results, and handles errors and credentials safely.

    Data Structure Designapi-designasyncerror-handlingstate-machine
  • Arrays & HashingMediumAuto-graded
    Text Spam Detector: Naive Bayes Classifier with F1 Score

    Tests understanding of probabilistic text classification by implementing a Multinomial Naive Bayes model from scratch and evaluating it with the F1 score.

    Arrays & Hashingnaive-bayestext-classificationf1-score
  • Data Structure DesignMediumModel answer
    Build a Time-Travel Key-Value Store with Snapshots

    Design a key-value store that supports cheap snapshots and historical reads without copying the entire map on each snapshot.

    Data Structure Designsnapshotsversioningbinary-searchcopy-on-write
  • Arrays & HashingEasyAuto-graded
    Count Unique Elements in Array

    Identify how many values appear exactly one time in an integer array using frequency analysis.

    Arrays & Hashinghash-tablecountingfrequency-map
  • StringsMediumAuto-graded
    Sliding Tokens: Valid String Transformation

    Tests two-pointer traversal, sequence invariants, and directional movement constraints with O(n) time and O(1) space.

    Stringstwo-pointersgreedyinvariants
  • Data Structure DesignHardModel answer
    Build a thread-safe sliding-window percentile monitor

    Implement a concurrent data structure that tracks latency measurements and computes approximate percentiles over a rolling time window with bounded memory.

    Data Structure Designconcurrencypercentileshistogramsliding-window
  • Dynamic ProgrammingHardAuto-graded
    Count Parity-Alternating Subsequences

    Tests dynamic programming with state tracking to count subsequences where consecutive elements alternate between even and odd values.

    Dynamic Programmingdynamic-programmingsubsequencesparitymodular-arithmetic
  • Data Structure DesignHardAuto-graded
    N-Player High-Card Showdown: Simulate and Score

    Tests object-style thinking, round-robin dealing, and deterministic simulation of a card game where each round's highest card wins all played cards.

    Data Structure Designsimulationqueuesgame-design
  • Greedy & IntervalsMediumAuto-graded
    Identify Gaps in a Sorted Array Within Bounds

    Tests interval reasoning, array traversal, edge case handling with boundaries, and formatting output for missing number ranges.

    Greedy & Intervalsarraysintervalsedge-cases
  • Data Structure DesignMediumModel answer
    Order Fulfillment Engine with Backorder Queue

    Process a stream of orders and restocks against live inventory, fulfilling backorders in arrival order before replenishing on-hand stock.

    Data Structure Designhash-mapqueuesimulationamortized-analysis
  • Data Structure DesignMediumModel answer
    Design a Money Transfer System with Pending Approvals

    Build an in-memory banking service supporting accounts, transaction history, and two-party transfers that only settle when the recipient explicitly accepts.

    Data Structure Designconcurrencyidempotencystate-machineobject-oriented-design
  • Arrays & HashingEasyAuto-graded
    Splice One Sequence Into Another by Index Range

    Tests careful list slicing and index boundary handling by replacing a contiguous subrange of one sequence with the full contents of a second sequence.

    Arrays & Hashingarraystwo-pointersimplementation
  • Arrays & HashingMediumAuto-graded
    Convolutional Layer Analysis: Shapes, Parameters, and Efficiency

    Calculate output dimensions, parameter counts, and multiply-accumulate operations for standard and depthwise separable convolutions.

    Arrays & Hashingconvolutional-networksparameter-countingcomputational-complexity
  • Data Structure DesignHardAuto-graded
    TTL-Aware LRU Cache with Lazy Expiration

    Tests ability to design an O(1) key-value store combining LRU eviction with per-entry time-to-live expiration using a hash map and doubly linked list.

    Data Structure Designlinked-listshash-mapcachelru
  • Data Structure DesignMediumModel answer
    Indentation-Aware Code Folding Engine

    Build a class that collapses and restores indentation-defined code blocks, tracking nested fold state and remapping display line numbers after each operation.

    Data Structure Designsimulationmonotonic-stackdata-structure-design
  • Data Structure DesignMediumModel answer
    Short-Circuit Async Boolean: Cancel Early, Return Fast

    Implement an async function that resolves true the moment any concurrent task returns true, cancelling all remaining work immediately.

    Data Structure Designasyncioconcurrencycancellationpython
  • Data Structure DesignEasyAuto-graded
    Replay an Operation Log to Answer Versioned Key Lookups

    Tests the ability to simulate a versioned key-value store by replaying a sequence of set/delete operations and answering point-in-time key lookups.

    Data Structure Designdata structuressimulationhash map
  • Data Structure DesignMediumAuto-graded
    Simulate LRU Cache with Composite Keys

    Tests understanding of LRU eviction policy, composite key normalization, and cache statistics tracking through command simulation.

    Data Structure Designlru-cachehashingordered-dictdata-structures
  • Trees & GraphsHardModel answer
    Logical Inference Engine: TRUE, FALSE, or Undetermined

    Build a function that classifies propositions as definitely true, definitely false, or undetermined given a set of facts and implication rules.

    Trees & Graphsgraphimplication2-SATDFS
  • Stacks & QueuesMediumAuto-graded
    Trim a Bracket String to Its Longest Balanced Form

    Tests stack-based bracket matching: find and remove the fewest characters from a parentheses-only string to leave a fully balanced result.

    Stacks & Queuesstacksstringsgreedy
  • Data Structure DesignMediumModel answer
    Build an In-Memory Notebook System with Rollback

    Design and implement a versioned in-memory notebook system supporting CRUD, case-insensitive search, user management, and full state rollback via a change log.

    Data Structure Designversioningooprollbackhashmap
  • Arrays & HashingMediumAuto-graded
    Sorted Array: All Unique Pairs With a Given Sum

    Tests whether a candidate can apply the two-pointer pattern on a sorted array to collect every distinct value pair that adds up to a target, without emitting duplicates.

    Arrays & Hashingtwo-pointerssortingdeduplication
  • Arrays & HashingMediumAuto-graded
    Paginate and Budget-Trim a Chat History

    Assemble a chronological transcript from paginated data, then reduce it to fit a token limit by removing the earliest messages.

    Arrays & Hashingpaginationsliding-windowsimulation
  • Trees & GraphsMediumAuto-graded
    Recursive Schema Validation

    Tests recursive validation of nested dictionaries against a schema with type and presence requirements.

    Trees & Graphsrecursionvalidationnested-structures
  • StringsEasyAuto-graded
    Fixed-Width Substitution Cipher: Encode and Decode

    Tests your ability to apply character-to-code substitution and reverse it using an inverted dictionary for O(1) chunk lookups.

    Stringsstringshash-mapsimulation
  • Stacks & QueuesMediumAuto-graded
    Identify Invalid Parentheses for Removal

    Tests stack-based matching to find the minimum set of parenthesis indices that must be removed to balance a string.

    Stacks & Queuesstackstring-processinggreedy
  • Linked ListsMediumAuto-graded
    Singly Linked List Symmetry Check (Non-Destructive)

    Tests whether a candidate can verify palindrome structure on a singly linked list in O(n) time and O(1) space while restoring every pointer before returning.

    Linked Liststwo-pointerslinked-listsin-place
  • Data Structure DesignMediumAuto-graded
    Circular Buffer Deque with Auto-Resize

    Tests ability to build a double-ended queue on a ring-indexed array that doubles in capacity when full, keeping all operations amortized O(1).

    Data Structure Designdequecircular-arrayamortized-analysis
  • Linked ListsMediumAuto-graded
    Ordered Stage Queue: Simulate Item Promotion and Demotion

    Tests whether a candidate can model item movement across ordered stages using a normalized O(1)-per-move doubly linked list structure.

    Linked Listslinked-listsimulationdesign