KatInterview

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

Interview Practice Problems

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

5991
Problems
2219
Auto-graded
15
Topics
270
Added today

Showing 1831–1860 of 2219 results

  • Math & Bit ManipulationMediumAuto-graded
    Match IP Address to Network Block

    Tests bitwise operations on IPv4 addresses, CIDR prefix matching, and linear search with early termination.

    Math & Bit Manipulationbit-manipulationipv4networkinglinear-search
  • Data Structure DesignMediumAuto-graded
    Incremental Entropy Tracker for Categorical Streams

    Build a data structure that efficiently computes Shannon entropy after each new categorical observation arrives.

    Data Structure Designstreamingentropyincremental-computation
  • Math & Bit ManipulationMediumAuto-graded
    Calculate Emergency Braking Distance and Decision

    Tests understanding of kinematic equations, motion physics, and numerical reasoning to determine whether a vehicle can stop in time given speed, obstacle distance, deceleration, and reaction delay.

    Math & Bit Manipulationphysicskinematicsnumerical-reasoning
  • Stacks & QueuesMediumAuto-graded
    Compute Arithmetic Expression with Operator Precedence

    Tests ability to parse and evaluate arithmetic expressions respecting operator precedence and left-to-right associativity without built-in eval.

    Stacks & Queuesparsingoperator-precedencemathstring-processing
  • Arrays & HashingMediumAuto-graded
    Classify Kernel Bottlenecks Using the Roofline Model

    Determine whether computational kernels are limited by arithmetic throughput or memory bandwidth using roofline analysis.

    Arrays & Hashingroofline-modelperformance-analysismemory-bandwidthcompute-bound
  • Data Structure DesignMediumAuto-graded
    Request Quota Tracker with Rolling Time Windows

    Tests your ability to track request counts per user within a sliding time window using efficient data structures.

    Data Structure Designsliding-windowqueuerate-limiting
  • Stacks & QueuesMediumAuto-graded
    Days Until Higher Temperature

    Tests efficient computation of the distance to the next strictly greater element using a monotonic stack to achieve linear time complexity.

    Stacks & Queuesmonotonic-stacknext-greater-elementarrays
  • Math & Bit ManipulationMediumAuto-graded
    Residue Distribution of Dice Sums and 2×2 Stochastic Determinants

    Tests whether a candidate can compute modular probability distributions over two-dice outcomes and derive the determinant formula for a constrained matrix class.

    Math & Bit Manipulationprobabilitylinear-algebramodular-arithmetic
  • Arrays & HashingMediumAuto-graded
    Top-K Document Retrieval by Cosine Similarity

    Tests vector similarity computation, efficient top-k selection with deterministic tie-breaking, and understanding of distance metrics in embedding spaces.

    Arrays & Hashingvectorssimilarityrankingnumerical-methods
  • Arrays & HashingMediumAuto-graded
    Add One to Array-Represented Number

    Tests array manipulation and carry logic when adding one to a number stored as an array of digits.

    Arrays & Hashingarrayssimulationmath
  • Greedy & IntervalsMediumAuto-graded
    Peak Overlap Point Across Closed Intervals

    Tests whether a candidate can use sweep-line event counting to locate the smallest integer covered by the greatest number of closed intervals.

    Greedy & Intervalssweep-lineintervalsdifference-array
  • Arrays & HashingHardAuto-graded
    Maximum Likelihood Estimation for Uniform Distribution Bounds

    Tests understanding of MLE derivation for bounded distributions and bias correction in parameter estimation.

    Arrays & Hashingstatisticsestimationprobabilitymle
  • StringsEasyAuto-graded
    Sum Two Arbitrarily Large Signed Integers as Strings

    Tests digit-by-digit arithmetic with sign handling and carry/borrow logic for adding very large signed integers represented as strings.

    Stringsstring-manipulationmathdigit-arithmetic
  • Greedy & IntervalsEasyAuto-graded
    Schedule Maximum Jobs Within Deadlines

    Tests the classic greedy exchange-argument insight: sort jobs by deadline to maximise the number of unit-length jobs completed before their deadlines.

    Greedy & Intervalsgreedyintervalssorting
  • Greedy & IntervalsMediumAuto-graded
    Count Valid Sum Pairs

    Tests greedy two-pointer technique on sorted arrays to maximize disjoint pairs meeting a sum condition.

    Greedy & Intervalstwo-pointersgreedysorting
  • Data Structure DesignMediumAuto-graded
    Build a Fixed-Size Cache That Forgets the Least-Used Entry

    Tests your ability to combine a hash map and an ordered structure to implement O(1) reads and writes with recency-based eviction.

    Data Structure Designhash-maplinked-listcachedesign
  • Arrays & HashingMediumAuto-graded
    Count Close Point Pairs Within Distance Threshold

    Efficiently count pairs of points where both coordinate differences are at most 2, testing hash-based spatial grouping with duplicate handling.

    Arrays & Hashingarrayshashinggeometrycombinatorics
  • Trees & GraphsMediumAuto-graded
    Count Separate Land Regions in a Grid

    Tests flood-fill traversal to identify connected components in a 2D grid with four-directional adjacency.

    Trees & Graphsgraphsbfsdfsconnected-components
  • Dynamic ProgrammingMediumAuto-graded
    Tile a Word Using a Vocabulary List

    Tests whether a candidate can apply forward-reachability DP with a trie to decide if a string can be fully covered by vocabulary words end-to-end.

    Dynamic Programmingdynamic-programmingstringstrie
  • StringsMediumAuto-graded
    Maximum Unique Character Window

    Tests sliding window technique with hash map to track character positions and find the longest contiguous segment with all distinct characters.

    Stringssliding-windowhash-maptwo-pointers
  • Arrays & HashingMediumAuto-graded
    Organize Matrix Rings by Sorting Perimeters

    Tests matrix traversal and boundary extraction by sorting each rectangular ring of a matrix independently in clockwise order.

    Arrays & Hashingmatrixtraversalsorting
  • Arrays & HashingMediumAuto-graded
    Count Occurrences in Fixed-Size Subarrays

    Tests efficient sliding window maintenance to track element frequency across consecutive fixed-length subarrays.

    Arrays & Hashingsliding-windowarrayfrequency-counting
  • Arrays & HashingEasyAuto-graded
    Qualifying Run Detector in a Timestamped Event Log

    Tests whether a candidate can scan a sorted event log in one pass to count maximal same-type runs that meet minimum length and duration thresholds.

    Arrays & Hashingarrayssliding-windowsimulation
  • Arrays & HashingEasyAuto-graded
    Clone a List with Index-Based Cross References

    Tests your ability to perform a deep copy of a nested list structure while preserving integer-indexed references between elements.

    Arrays & Hashingarraysdeep-copylist-manipulation
  • Greedy & IntervalsMediumAuto-graded
    Task Scheduler with Cooldown Periods

    Tests greedy scheduling with frequency counting to compute minimum execution time under per-task-type cooldown constraints.

    Greedy & Intervalsgreedyfrequency-countingscheduling
  • Data Structure DesignMediumAuto-graded
    Flatten and Filter a Nested Configuration Tree

    Tests the ability to write an iterator-style traversal over arbitrarily nested dicts and lists to extract leaf values matching a type filter.

    Data Structure Designdata structuresrecursioniteratorsnested data
  • Math & Bit ManipulationEasyAuto-graded
    Unit Sales Target After Fixed Cost Increase

    Tests cost-volume-profit analysis by computing last period's profit and the sales volume needed to maintain that profit when fixed costs rise.

    Math & Bit Manipulationmathbusiness-logicformulas
  • Arrays & HashingEasyAuto-graded
    Align Temperature Readings with Prior Humidity Data

    Tests ability to perform temporal joins on sorted time-series data with per-key state tracking and careful timestamp comparison.

    Arrays & Hashingtime-seriestwo-pointershash-table
  • Data Structure DesignMediumAuto-graded
    Simulate a Price-Level Tracker for Buy and Sell Orders

    Tests your ability to combine a hash map with a lazy-deletion heap to track best bid and ask prices across a sequence of order book operations.

    Data Structure Designheaphash-maplazy-deletionsimulation
  • Greedy & IntervalsMediumAuto-graded
    Balance Wealth Through Optimal Integer Transfers

    Tests greedy two-pointer coordination and integer division to equalize values with minimal movement.

    Greedy & Intervalsgreedytwo-pointersmathsimulation