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 2551–2580 of 2765 results
- Data Structure DesignMediumModel answerText Editor with Undo and Word Suggestions
Build a text editor class supporting character insertion, deletion, cursor movement, undo/redo operations, and prefix-based word autocompletion.
Data Structure Designdata-structurestrieundo-redogap-buffer - Math & Bit ManipulationMediumAuto-gradedMaximum Theater Group Seating Capacity
Tests bitmask-based interval availability checking for constrained seat allocation with large input optimization.
Math & Bit Manipulationbitmaskgreedyoptimization - Trees & GraphsMediumAuto-gradedSubtree Sum Replacement in Level-Order Arrays
Tests post-order traversal, heap indexing in complete binary trees, and efficient bottom-up aggregation without recursion.
Trees & Graphsbinary-treespost-order-traversalcomplete-binary-treeaggregation - Data Structure DesignHardAuto-gradedStreaming Median Query
Tests balanced heap design to maintain dynamic order statistics with logarithmic insertions and constant-time median queries.
Data Structure Designheapsdata-structuresstreamingmedian - Arrays & HashingHardAuto-gradedRandom Transfer Between Two Queues: Drain Time and Odds
Tests ability to model a lazy symmetric random walk as a Markov chain, derive a closed-form hitting-time formula, and compute absorption probabilities analytically.
Arrays & Hashingmarkov-chainsrandom-walkprobability - Trees & GraphsHardAuto-gradedEarliest Moment a Social Network Becomes Fully Connected
Tests offline dynamic graph connectivity using a segment-tree-over-time with a rollback-capable union-find to handle both edge insertions and deletions.
Trees & Graphsunion-findsegment-treedynamic-connectivity - Heaps, Sorting & SearchEasyAuto-gradedMinimum Largest Piece After K Cuts on a Log
Tests binary search on the answer to find the minimum possible largest piece when splitting a log into at least K+1 pieces.
Heaps, Sorting & Searchbinary searchgreedysorting - Dynamic ProgrammingMediumAuto-gradedPack Exactly K Items with Maximum Total Value
Tests the candidate's ability to apply a 2D knapsack variant requiring exactly a fixed item count while maximizing value, combining count and capacity constraints via DP.
Dynamic Programmingdynamic programmingknapsack2d dp - Heaps, Sorting & SearchMediumAuto-gradedCount Active Users in Trailing Time Window
Tests binary search on sorted lists to efficiently count distinct entities with at least one event in a sliding time range.
Heaps, Sorting & Searchbinary-searchtime-seriessliding-window - Arrays & HashingMediumAuto-gradedBalance and Settle Shared Costs
Tests the ability to calculate net balances from shared expense records and generate transfers that zero out all debts.
Arrays & Hashinghash-mapgreedysimulation - Data Structure DesignMediumModel answerParallel Job Scheduler with Dependency Management
Build a concurrent task executor that honors dependencies, enforces worker limits, and propagates failures through dependent jobs.
Data Structure Designconcurrencygraphstopological-sort - Data Structure DesignMediumModel answerFrequency Tracking with Static and Streaming Top-K Retrieval
Build data structures to identify the most frequent elements in three scenarios: a fixed array, an unbounded stream, and a time-windowed stream.
Data Structure Designfrequency-countingheapssliding-windowstreaming-algorithms - Data Structure DesignMediumAuto-gradedBilling Ledger with Credit Prioritization and Backdating
Process billing events where credits pay usage before subscription fees, supporting out-of-order event insertion with selective recomputation.
Data Structure Designdata-structuressimulationordered-data - StringsMediumAuto-gradedMinimum Window with K Distinct Characters
Tests sliding window technique with character frequency tracking to find the smallest substring containing exactly k distinct characters.
Stringssliding-windowhash-maptwo-pointers - Trees & GraphsMediumAuto-gradedSchedule Tasks With Resource Unlock Dependencies
Tests ability to apply topological ordering to determine a valid execution sequence of tasks where each task may unlock resources required by others.
Trees & Graphsgraphstopological sortDAGKahn's algorithm - Greedy & IntervalsMediumAuto-gradedLocate Uncovered Ranges Between Intervals
Tests interval merging, sorting, and boundary logic to identify all missing integer ranges within the overall coverage span.
Greedy & Intervalsintervalssortingmergingranges - StringsMediumModel answerRemove Paths by Prefix Hierarchy
Remove all paths that match or fall under any deletion target in a hierarchical filesystem-like structure.
Stringstrieprefix-matchingstring-processing - Data Structure DesignMediumModel answerIn-Memory Payroll Tracker with Partial Settlement
Build an object-oriented service to log driver work intervals, compute wages, and process payments while preventing double-pay and handling overlaps.
Data Structure Designobject-oriented-designtime-intervalsmoney-arithmeticstate-management - Arrays & HashingMediumAuto-gradedBalance Point Count in a Weighted Sensor Array
Tests the ability to use prefix sums to efficiently count indices where the weighted sum to the left equals the weighted sum to the right.
Arrays & Hashingarraysprefix sumshash maps - Heaps, Sorting & SearchEasyAuto-gradedRunning Median After Each Insertion
Tests median maintenance using two heaps to efficiently return the running median after each element is added to a growing sequence.
Heaps, Sorting & Searchheapssortingmedian maintenance - Arrays & HashingMediumAuto-gradedMaximum Straight-Line Distance Through Dangerous Zones
Tests efficient grid reasoning with blocked regions and directional movement constraints using binary search.
Arrays & Hashingbinary-searchgridgeometry - Arrays & HashingMediumAuto-gradedKeep First Occurrence of Each Element
Tests understanding of hash-based deduplication while maintaining insertion order in a single pass through an array.
Arrays & Hashingarrayshash-setdeduplicationorder-preservation - Data Structure DesignMediumAuto-gradedTime-Aware Key-Field Store with Expiration
Tests ability to implement an in-memory store with nested key-field structure, lexicographic scanning, timestamps, and TTL-based expiration logic.
Data Structure Designhash-mapsimulationtime-based-expiration - 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 & GraphsHardModel answerNavigate Between Nodes in a Recursively Defined Binary Tree
Determine the path between two nodes in a Fibonacci-style binary tree using only their preorder indices, without building the tree in memory.
Trees & Graphsbinary-treesrecursionfibonaccitree-traversal - 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