KatInterview

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

Interview Practice Problems

Practice 5993 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.

5993
Problems
2220
Auto-graded
15
Topics
270
Added today

Showing 1801–1830 of 2220 results

  • Arrays & HashingMediumAuto-graded
    Filter Devices by Status, Threshold, and Registration Month

    Tests nested JSON navigation, timestamp parsing in UTC, date-range filtering, and numeric comparison with multiple simultaneous predicates.

    Arrays & Hashingjsondatetimefilteringdata-processing
  • Heaps, Sorting & SearchMediumAuto-graded
    Merge Sorted Streams with Memory Constraint

    Tests heap-based merging of multiple sorted sequences under strict O(k) space while maintaining stable duplicate handling.

    Heaps, Sorting & Searchheapsortingmergespace-complexity
  • StringsHardAuto-graded
    Mini Policy Engine: Boolean Rule Evaluation for Post Routing

    Tests whether a candidate can build a recursive-descent parser for a small boolean expression language and wire it into a first-match rule dispatcher.

    Stringsparsingrecursionstring processing
  • Heaps, Sorting & SearchMediumAuto-graded
    Greedy Task Merging and Segment Removal Cost

    Tests greedy heap-based merge cost minimization and prefix-sum sliding-window removal to minimize adjacent absolute differences.

    Heaps, Sorting & Searchgreedyheapprefix-sumssliding-window
  • StringsMediumAuto-graded
    Tiered Identity Validation for Business Onboarding

    Tests your ability to implement a sequential rule-engine with string normalization, token-set comparison, and strict short-circuit logic across three validation tiers.

    Stringsstringshashingsimulation
  • Math & Bit ManipulationEasyAuto-graded
    Calculate Population Variance Using Welford's Method

    Tests ability to implement numerically stable variance computation with single-pass streaming aggregation and handling of floating-point precision issues.

    Math & Bit Manipulationmathstatisticsnumerical-stabilitystreaming
  • Math & Bit ManipulationHardAuto-graded
    Splitting Tokens: Will a Bucket Ever Run Dry?

    Tests whether a candidate can identify a modular-arithmetic invariant to avoid simulating an exponentially long process.

    Math & Bit Manipulationmathbit-manipulationnumber-theory
  • Heaps, Sorting & SearchMediumAuto-graded
    Slice a Sorted Event Stream by Timestamp Window

    Tests binary search boundary reasoning on a sorted sequence with duplicate timestamps and inclusive range semantics.

    Heaps, Sorting & Searchbinary-searcharrayssorting
  • Greedy & IntervalsMediumAuto-graded
    Peak Concurrent Tasks: Minimum Workers Needed

    Tests interval overlap detection using sweep-line or heap techniques to find the maximum number of simultaneously active tasks.

    Greedy & Intervalsintervalssortingheapsweep-line
  • Arrays & HashingMediumAuto-graded
    Shortest Subarray With All K Distinct Characters Present

    Tests ability to use a sliding window with a hash-count map to find the minimum-length contiguous subarray that contains every distinct character appearing in a string at least a given number of times.

    Arrays & Hashingarrayshash mapsliding window
  • Stacks & QueuesMediumAuto-graded
    Compute an Arithmetic Expression Honoring Operator Precedence

    Tests ability to parse and compute integer arithmetic respecting operator precedence without using eval or a full expression parser.

    Stacks & Queuesparsingoperator-precedencestack
  • SQL & DataMediumAuto-graded
    Regional Notification Performance Summary

    Tests join, filter, and conditional aggregation logic to compute per-region metrics with threshold filtering and safe division.

    SQL & Dataaggregationjoinsconditional-logicdata-analysis
  • StringsMediumAuto-graded
    Chunked Stream Parser and Debt Settlement

    Tests buffered string parsing over an incremental data source combined with greedy net-balance clearing across a set of financial transfers.

    Stringsstringsgreedy-intervalsdesign-ds
  • Stacks & QueuesMediumAuto-graded
    Evaluate Nested Arithmetic Brackets with Sign Propagation

    Tests expression evaluation using a monotonic/simulation stack to handle deeply nested signed bracket expressions with +/- operators and integer literals.

    Stacks & Queuesstacksexpression evaluationparsingsimulation
  • Arrays & HashingHardAuto-graded
    Computing Equilibrium Bids in Single-Item Auctions

    Tests understanding of dominant strategy equilibria in second-price auctions and Bayesian Nash equilibria in first-price auctions with uniform value distributions.

    Arrays & Hashinggame-theoryauction-theoryexpected-valuebayesian-equilibrium
  • Data Structure DesignMediumAuto-graded
    Versioned Social Graph: Follow, Snapshot, and Recommend

    Tests data-structure design for a directed follow graph with copy-on-snapshot history and friend-of-friend recommendations ranked by mutual count.

    Data Structure Designhash-mapsimulationdesign
  • Arrays & HashingHardAuto-graded
    Collect All Valid Triples in a Four-Attribute Card Game

    Tests recognition of a combinatorial validity rule across four ternary attributes and the insight that any two cards uniquely determine the third, reducing O(n³) brute force to O(n²).

    Arrays & Hashinghashingcombinatoricsmath
  • Arrays & HashingMediumAuto-graded
    Compute Speeding Penalties from Trajectory Data

    Measures violations of a velocity threshold by calculating duration and magnitude of excess speed from sampled position sequences.

    Arrays & Hashingarrayssimulationnumerical-methods
  • Heaps, Sorting & SearchMediumAuto-graded
    K Nearest Value Pairs in a Sorted Sequence

    Tests whether a candidate can efficiently extract the k pairs with smallest gap from a sorted array using a heap-based k-way merge instead of brute force enumeration.

    Heaps, Sorting & Searchheapsortingtwo-pointersarrays
  • Data Structure DesignMediumAuto-graded
    Circular Buffer with Fixed Capacity

    Tests implementation of a bounded FIFO queue using circular array indexing with constant-time operations.

    Data Structure Designqueuecircular-bufferarraydata-structure-design
  • Data Structure DesignEasyAuto-graded
    Execute Turn-Based Movement Commands on a Line

    Tests state tracking and rule validation for alternating player moves on a bounded one-dimensional board.

    Data Structure Designsimulationstate-machinevalidation
  • Trees & GraphsMediumAuto-graded
    Network Unification Timestamp

    Tests Union-Find data structure application to track dynamic graph connectivity and determine when all nodes merge into one component.

    Trees & Graphsunion-finddisjoint-setgraph-connectivity
  • Arrays & HashingMediumAuto-graded
    Binary Classifier Threshold & Cost Trade-off Calculator

    Tests whether candidates can compute F1, confusion matrix counts, and deployment cost for two classifier configurations, then select the cheaper model to deploy.

    Arrays & Hashingmachine-learningclassificationevaluation-metrics
  • Trees & GraphsHardAuto-graded
    Minimum Steps to Collect All Keys in a Grid Maze

    Tests BFS shortest path on a grid where state must encode both position and the set of collected keys, requiring multi-dimensional state space exploration.

    Trees & Graphsgraphsbfsgridbitmask
  • Math & Bit ManipulationMediumAuto-graded
    Parse Mixed-Endian Binary Protocol Fields

    Tests byte-level manipulation to extract little-endian and big-endian integers from a raw byte buffer without relying on architecture-specific memory layout.

    Math & Bit Manipulationbit-manipulationbytesendianness
  • Arrays & HashingEasyAuto-graded
    Assign Each Person a Tracked ID or a Fallback Value

    Tests left-join logic and fallback lookups by requiring every person to appear with either their mapped ID or a supplied default.

    Arrays & Hashinghash-maplookupleft-join
  • Stacks & QueuesMediumAuto-graded
    Evaluate Arithmetic Expression with Operator Precedence

    Tests implementation of expression evaluation using stacks to handle operator precedence and parentheses correctly.

    Stacks & Queuesstackexpression-parsingoperator-precedence
  • Data Structure DesignMediumAuto-graded
    Compute Credit Ledger with Expiration

    Implement an in-memory ledger that manages time-limited credits with priority expiration and debt tracking.

    Data Structure Designheappriority-queuesimulation
  • StringsMediumAuto-graded
    Trending Tags in Time Window

    Tests filtering by time range, frequency counting with a dictionary, and sorting with multi-level tie-breaking rules.

    Stringshash-mapsortingstring-parsing
  • Data Structure DesignEasyAuto-graded
    Multi-User File System with Snapshots and Account Consolidation

    Build an in-memory file storage system with per-user quotas, global file uniqueness, ranked retrieval, account merging, and atomic snapshot restore.

    Data Structure Designhash-mapsimulationdata-structure-design