practice a little every day — you've got this ♡
Interview Practice Problems
Practice 6000 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.
- 6000
- Problems
- 2221
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 1681–1710 of 2221 results
- Trees & GraphsHardAuto-gradedPrune All Leaves Matching a Value, Cascading Upward
Tests whether a candidate can use post-order traversal to handle cascading leaf deletions in a binary tree encoded as a level-order list.
Trees & Graphsbinary-treepost-order-traversalrecursiontree-serialization - Heaps, Sorting & SearchMediumAuto-gradedK Nearest Points to Origin
Tests heap-based selection and distance computation to efficiently find the k points closest to the origin in 2D space.
Heaps, Sorting & Searchheapdistanceselectionoptimization - Data Structure DesignMediumAuto-gradedBinary Layout Manager with Dynamic Field Insertion
Tests ability to maintain ordered sequences with efficient prefix-sum queries and positional insertions using balanced tree structures.
Data Structure Designbinary-search-treeprefix-sumdata-structure-design - Trees & GraphsMediumAuto-gradedSubtree Erasure in an Array-Backed Binary Tree
Tests implicit heap-tree traversal, subtree identification via index arithmetic, and stable compaction without mutating the input array.
Trees & Graphstrees-graphsarraysbfs-dfs - Arrays & HashingEasyAuto-gradedBest-of-Five: Probability All Five Games Are Played
Tests whether a candidate can derive the closed-form probability that a best-of-five series requires all five games, using combinatorial reasoning.
Arrays & Hashingprobabilitycombinatoricsmath - Arrays & HashingEasyAuto-gradedExpected Coin Flips to Observe Heads Then Tails
Tests ability to model a probabilistic process with states and solve expectation equations.
Arrays & Hashingprobabilityexpected-valuemarkov-chains - Data Structure DesignMediumAuto-gradedPriority Queue Scheduler + Expression Evaluator
Tests heap-based priority scheduling with tie-breaking and recursive-descent expression parsing with variable substitution.
Data Structure Designheapparsingdesign - Arrays & HashingMediumAuto-gradedSample Mean: Expected Value and Variance Under Correlation
Tests ability to compute the expected value and variance of a sample mean when observations share a common correlation, plus limiting behavior in boundary cases.
Arrays & Hashingstatisticsprobabilityexpected-valuevariance - Greedy & IntervalsMediumAuto-gradedConsolidate Overlapping Time Ranges
Tests whether a candidate can sort and scan a list of closed intervals to collapse all overlapping or touching ranges into a minimal merged set.
Greedy & Intervalsintervalssortinggreedy - Math & Bit ManipulationMediumAuto-gradedCount Subsequences With Uniform Letter Frequency
Tests combinatorics, modular arithmetic, and frequency grouping by counting index-distinct subsequences where every included letter appears the same number of times.
Math & Bit Manipulationcombinatoricsmodular arithmeticfrequency counting - Heaps, Sorting & SearchMediumAuto-gradedFind K Closest Elements in Sorted Array
Tests binary search on sorted arrays to locate a contiguous window of k elements with minimum distance to a target value.
Heaps, Sorting & Searchbinary-searchtwo-pointerssliding-window - Data Structure DesignMediumAuto-gradedRate Limiter with Bucket Drain Simulation
Tests ability to model a rate-limiting algorithm with time-based decay, capacity bounds, and precise edge-case handling.
Data Structure Designrate-limitingsimulationstate-machine - Arrays & HashingHardAuto-gradedFind All Contiguous Segments with Target Total
Tests prefix sum tracking with hash maps to efficiently count all contiguous subsequences that sum to a target value.
Arrays & Hashingprefix-sumhash-maparray - Greedy & IntervalsMediumAuto-gradedMinimum Classrooms to Schedule All Lectures
Tests whether a candidate can reframe a resource-allocation problem as peak interval overlap and handle half-open boundary conditions correctly.
Greedy & Intervalsintervalssweep-linegreedysorting - Stacks & QueuesMediumAuto-gradedCompute Arithmetic Expression with Operator Precedence
Tests parsing and evaluating mathematical expressions with proper operator precedence and parentheses using stack-based techniques.
Stacks & Queuesstacksexpression-parsingoperator-precedence - Data Structure DesignMediumAuto-gradedSimulate a Cache with Recency-Based Eviction
Tests data structure design by building an in-memory cache that removes the least recently accessed entry when full.
Data Structure Designhash-maplinked-listcacheeviction-policy - Data Structure DesignMediumAuto-gradedCount-Weighted Random Sampling with Dynamic Insertions and Removals
Design a multiset supporting constant-time insert, remove, and random selection where each element's pick probability is proportional to its frequency.
Data Structure Designhash-maparraysrandomizationdata-structure-design - Arrays & HashingEasyAuto-gradedDaily-Deal Voucher: Restaurant Profit & Break-Even Analysis
Tests whether you can build a contribution-margin model for a voucher partnership, solve break-even and sensitivity equations, and decompose a profit change into its drivers.
Arrays & Hashingunit economicscontribution marginbreak-even analysis - Trees & GraphsMediumAuto-gradedMinimum Hops Between Nodes in a Matrix-Represented Graph
Tests ability to implement BFS on an undirected unweighted graph stored as an adjacency matrix to find the fewest edges between two nodes.
Trees & Graphsgraphsbfsadjacency-matrix - Trees & GraphsMediumAuto-gradedMinimum Collections to Link Two Items
Tests bipartite graph traversal and BFS to find shortest paths alternating between items and their containing collections.
Trees & Graphsgraph-theorybfsbipartite-graph - Data Structure DesignMediumAuto-gradedSimulate a Stack with Instant Maximum Access
Tests data structure design skills by building a stack that supports O(log n) max retrieval and removal, including removal from the middle when duplicates exist.
Data Structure Designstackheaplinked-listlazy-deletion - Greedy & IntervalsMediumAuto-gradedFill a Cargo Hold for Maximum Value With Limited Item Supply
Tests whether a candidate can recognize that a bounded knapsack with uniform item weight reduces to a greedy sort-and-fill, handling large capacities and stock counts efficiently.
Greedy & Intervalsgreedysortingbounded-knapsack - Data Structure DesignMediumAuto-gradedExecute Banking Operations with Transaction History
Tests command-pattern operation execution, input validation, atomic state transitions, and maintaining per-entity audit logs.
Data Structure Designsimulationvalidationstate-management - Stacks & QueuesMediumAuto-gradedConcert Venue Ticketing with Capacity and a Waiting Line
Tests event-driven simulation skills: tracking visitor state, enforcing a seating capacity, managing a FIFO waitlist, and collecting one-time entry fees.
Stacks & Queuessimulationqueuehash-set - Data Structure DesignMediumAuto-gradedBuild a Multi-User File System with Quotas and Compression
Design an in-memory file manager tracking per-user storage limits, file operations, pattern matching, and size adjustments with atomic quota enforcement.
Data Structure Designhash-tablessimulationdesign - Dynamic ProgrammingHardAuto-gradedCount Sorted Sequences Matching Per-Position Digit Sums
Tests dynamic programming over value buckets with a two-pointer prefix-sum transition to count sorted integer sequences under a digit-sum constraint.
Dynamic Programmingdynamic-programmingarraysmath-bits - StringsMediumAuto-gradedHighest Frequency Letter with Alphabetical Tie-Breaking
Tests efficient character frequency counting and consistent tie-breaking using fixed-size auxiliary space.
Stringsstringsarraysfrequency-counting - Math & Bit ManipulationMediumAuto-gradedLongest Non-Overlapping Character Chain
Tests backtracking or bitmask optimization to select a subset of strings whose combined characters are all distinct.
Math & Bit Manipulationbacktrackingbit-manipulationrecursion - SQL & DataEasyAuto-gradedCo-Access Analytics on Document Usage Logs
Tests data deduplication, self-joins, metric definition, and grouped aggregation over access logs with user metadata.
SQL & Datadata-manipulationaggregationjoinsdeduplication - StringsMediumAuto-gradedFix a Row-to-CSV Converter: Output Correctness and Efficiency
Tests whether a candidate can spot a trailing-comma output bug and a quadratic string-building performance problem, then write a correct, efficient fix.
Stringsstringsperformancejoins