practice a little every day — you've got this ♡
Coding Interview Problems
Practice 5980 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.
- 5980
- Problems
- 2215
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 1951–1980 of 2115 results
- Trees & GraphsMediumAuto-gradedAggregate User Permissions Through Account Ancestry
Tests hierarchical graph traversal and efficient permission accumulation using ancestor path lookup and set operations.
Trees & Graphsgraphstreesbfscaching - Trees & GraphsMediumAuto-gradedCalculate Cumulative Task Weights in a Dependency Graph
Tests graph traversal and dynamic programming on DAGs to compute propagated weight contributions through dependency chains.
Trees & Graphsgraphsdagtopological-sortdynamic-programming - Trees & GraphsMediumAuto-gradedRank Build Targets by Dependency Order
Tests whether a candidate can produce a valid topological ordering of a build-dependency DAG and apply a precise tie-break rule when multiple orderings exist.
Trees & Graphsgraphstopological sortBFSKahn's algorithm - Trees & GraphsHardAuto-gradedFastest Delivery Route with Fuel Station Stops
Tests the ability to extend Dijkstra's algorithm with a constrained resource (fuel), requiring candidates to track both position and remaining fuel as state.
Trees & Graphsgraphsdijkstrashortest pathdynamic programming - Dynamic ProgrammingHardAuto-gradedConstruct Arithmetic Expression Matching Target
Tests subset enumeration with bitmask DP, binary expression tree generation, operator application with exact rational arithmetic, and combinatorial search.
Dynamic Programmingbitmask-dprecursioncombinatorics - Trees & GraphsMediumAuto-gradedIdentify Connected Power Grid Regions
Tests union-find (disjoint set union) to group transmission lines into connected components and answer queries about grid connectivity.
Trees & Graphsunion-findgraphsconnected-components - Trees & GraphsMediumAuto-gradedGreenhouse Disease Spread Timer
Tests multi-source BFS to find the time until a grid-based propagation process completes or determine impossibility.
Trees & Graphsbreadth-first-searchgridmulti-source-bfs - Arrays & HashingEasyAuto-gradedCombine Two Ordered Sequences
Tests your ability to merge two pre-sorted arrays into a single sorted result using the classic two-pointer technique.
Arrays & Hashingtwo-pointerssortingmerge - Arrays & HashingEasyAuto-gradedTrack Target Occurrence Patterns Across Array Regions
Identifies whether a target value occurs at even/odd indices and in the first/second half of an even-length array in one pass.
Arrays & Hashingarray-traversalboolean-flagsearly-termination - Math & Bit ManipulationMediumAuto-gradedCalculate Ride Service Economics and Peak Pricing
Tests unit economics, capacity planning, and dynamic pricing calculations for a transportation service with fixed driver costs and variable demand.
Math & Bit Manipulationunit-economicscapacity-planningprofit-calculation - Trees & GraphsMediumAuto-gradedFind All Downstream Dependents in a Dependency Graph
Tests graph traversal with edge reversal to find all nodes reachable through reversed dependency edges, handling cycles correctly.
Trees & Graphsgraph-traversalbfsdirected-graphcycle-detection - Heaps, Sorting & SearchMediumAuto-gradedCount Valid Number Triplets Within Range
Find how many ways to pick three numbers from an array where the maximum minus the minimum stays within a given threshold.
Heaps, Sorting & Searchsortingtwo-pointerscombinatorics - Arrays & HashingEasyAuto-gradedApply Range Paint Operations and Count Final Colors
Tests ability to use difference arrays to efficiently apply multiple range-update operations and decode the final state.
Arrays & Hashingarraysdifference arrayprefix sumshashing - Greedy & IntervalsMediumAuto-gradedMinimum Deletions to Remove Half the Elements
Tests greedy selection by frequency: choose the fewest distinct values whose total occurrences cover at least half the array.
Greedy & Intervalsgreedyhashingsorting - Trees & GraphsMediumAuto-gradedFind Build Order With Optional Priorities
Tests whether a candidate can produce a valid topological ordering of task dependencies while breaking ties by smallest task ID for determinism.
Trees & Graphsgraphstopological sortBFSKahn's algorithm - Stacks & QueuesEasyAuto-gradedValidate Nested Tag Pairs in a Markup String
Tests whether candidates can simulate bracket-matching logic with named tags, enforcing strict open/close pairing and proper nesting order.
Stacks & Queuesstacksbracket matchingparsingsimulation - Arrays & HashingMediumAuto-gradedPopulation Size from Two-Sample Overlap
Apply the capture-recapture estimator to infer total population size from overlapping detection counts.
Arrays & Hashingstatisticsestimationprobability - Dynamic ProgrammingMediumAuto-gradedMaximum Profit from Two Stock Transactions
Tests dynamic programming with state transitions to find optimal profit from up to two non-overlapping buy-sell trades given daily stock prices.
Dynamic Programmingarraysstate-machineoptimization - Heaps, Sorting & SearchMediumAuto-gradedUnique Element Count in Sorted Array with Binary Search
Tests efficient counting of distinct values in a sorted array using binary search to skip duplicate runs, achieving better than linear time complexity.
Heaps, Sorting & Searchbinary-searcharraysoptimization - Greedy & IntervalsMediumAuto-gradedFill Bag with Maximum Value from Identical-Weight Items
Tests greedy optimization when all items have uniform weight, requiring recognition that standard knapsack DP is unnecessary and handling large counts efficiently.
Greedy & Intervalsgreedysortingoptimization - Data Structure DesignMediumAuto-gradedKey-Value Store with Expiration and Snapshots
Design a nested dictionary with field-level expiration times and the ability to capture and restore database snapshots.
Data Structure Designhash-tablesimulationdata-structure-design - Arrays & HashingMediumAuto-gradedEvent Log Analysis: Distinct Users and Session Duration
Tests grouping, deduplication, and timestamp arithmetic over semi-structured event records.
Arrays & Hashinggroupingaggregationtimestampsdata-wrangling - Dynamic ProgrammingHardAuto-gradedPeak Subsequence Maximum Sum
Tests dynamic programming with coordinate compression and Fenwick trees to efficiently compute optimal bitonic subsequences.
Dynamic Programmingdynamic-programmingfenwick-treecoordinate-compressionbitonic-sequence - Dynamic ProgrammingHardAuto-gradedMinimum-Cost Path with Fuel Stops on a Grid
Tests grid DP with an extra state dimension: navigate an N×M grid from top-left to bottom-right tracking remaining fuel, refueling at marked cells, minimizing total toll cost.
Dynamic Programmingdynamic programminggridstatememoization - Arrays & HashingMediumAuto-gradedRide Service Demand Under Weather Conditions
Apply the Law of Total Probability and Bayes' Theorem to compute ride request likelihoods and conditional weather probabilities.
Arrays & Hashingprobabilitybayes-theoremconditional-probability - Dynamic ProgrammingHardAuto-gradedPath Sum with Conditional Prime Shortcuts
Tests dynamic programming with number theory constraints, combining sequential traversal with prime-offset jumps that depend on target cell properties.
Dynamic Programmingdynamic-programmingnumber-theoryarrays - Math & Bit ManipulationEasyAuto-gradedSmallest Integer Divisible by All in Range
Tests understanding of LCM computation via repeated GCD to find the least positive integer divisible by every integer in a given range.
Math & Bit Manipulationmathnumber-theorygcd-lcm - Stacks & QueuesHardAuto-gradedEvaluate a Ternary-Chained Arithmetic Expression
Tests expression evaluation using a monotonic/operator-precedence stack to correctly parse and compute a string containing +, -, *, /, parentheses, and nested ternary operators.
Stacks & Queuesstacksexpression evaluationparsingmonotonic stack - Arrays & HashingMediumAuto-gradedRetrieve Minimum and Mode from Array
Tests efficient computation of two simple aggregate statistics using optimal data structures and complexity analysis.
Arrays & Hashinghash-mapscountingcomplexity-analysis - Math & Bit ManipulationMediumAuto-gradedCount Pairs Whose XOR Has Exactly K Set Bits
Tests the ability to combine bit counting (popcount) with efficient pair enumeration to find pairs in an array whose XOR contains exactly K set bits.
Math & Bit Manipulationbit manipulationnumber theorycombinatorics