practice a little every day — you've got this ♡
Coding Interview Problems
Practice 5974 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.
- 5974
- Problems
- 2212
- Auto-graded
- 15
- Topics
- 269
- Added today
Showing 2011–2040 of 2112 results
- Dynamic ProgrammingMediumAuto-gradedMinimum Tokens to Reach a Score: Reusable vs. One-Time Use
Tests whether a candidate can implement both unbounded and 0/1 knapsack DP to find the smallest number of tokens that sum exactly to a target.
Dynamic Programmingdynamic-programmingknapsackbottom-up-dp - Stacks & QueuesMediumAuto-gradedMinimum Length Subarray with Sum Threshold
Tests the ability to optimize subarray sum queries using prefix sums and monotonic deque when values can be negative.
Stacks & Queuesprefix-sumsmonotonic-dequesliding-windowarray - Data Structure DesignMediumAuto-gradedAggregate Scores Across a Sponsorship Tree
Tests tree traversal and subtree aggregation by computing cumulative scores bottom-up across a forest of sponsor-recruit relationships.
Data Structure Designtrees-graphsdesign-dsstacks-queues - Greedy & IntervalsMediumAuto-gradedAssign Tasks to Time Slots with Minimum Idle Penalty
Tests the exchange-argument greedy technique by scheduling deadline-bearing tasks into time slots to minimize total weighted idle (missed-deadline) penalty.
Greedy & Intervalsgreedyintervalsschedulingexchange argument - Arrays & HashingEasyAuto-gradedComplete the Run: Find the Gap in a Five-Card Sequence
Tests ability to handle encoded card ranks, Ace-as-low/high semantics, ambiguous endpoints, and missing-element logic in a fixed consecutive sequence.
Arrays & Hashingarraysstringsenumeration - Trees & GraphsMediumAuto-gradedConnected Land Regions in a Character Matrix
Tests graph traversal and connected-component identification on a 2D grid using flood-fill techniques.
Trees & Graphsgraph-traversaldfsconnected-componentsgrid - Dynamic ProgrammingEasyAuto-gradedCount Paths Through a Grid with Blocked Cells
Tests whether a candidate can apply bottom-up DP on a 2-D grid to count reachable paths from top-left to bottom-right while respecting blocked cells.
Dynamic Programmingdynamic programminggridpaths - StringsMediumAuto-gradedDecode a Run-Length Encoded String With Nested Groups
Tests the ability to parse and expand a run-length encoded string that contains arbitrarily nested bracket groups, combining stack-based parsing with string manipulation.
Stringsstringsparsingstackrun-length encoding - Trees & GraphsMediumAuto-gradedDetect Circular Dependencies in a Build System
Tests cycle detection in a directed graph by determining which packages in a build dependency graph are part of a circular dependency chain.
Trees & Graphsgraphscycle detectionDFStopological sort - Stacks & QueuesEasyAuto-gradedEvaluate Simple Arithmetic String Expressions
Tests ability to evaluate a string expression containing non-negative integers, +, -, *, / operators, and parentheses using a stack-based approach.
Stacks & Queuesstacksexpression evaluationparsing - Dynamic ProgrammingHardAuto-gradedFind Minimum Cost to Multiply a Chain of Matrices
Tests dynamic programming on interval optimization, optimal substructure, and avoiding greedy pitfalls in matrix multiplication ordering.
Dynamic Programmingdynamic-programmingoptimizationrecursion - Linked ListsMediumAuto-gradedFind the Duplicate and Cycle Length in a Functional Graph
Tests cycle detection on an index-as-next-pointer array to find the single duplicate value and the length of the cycle it creates.
Linked Listslinked listscycle detectionFloyd's algorithm - Arrays & HashingEasyAuto-gradedFind the First Character Appearing Exactly Once
Tests the ability to use hash counting (frequency maps) to efficiently locate the first character in a string that appears exactly once.
Arrays & Hashingarrays & hashinghash countingstrings - Arrays & HashingEasyAuto-gradedFind the Most Frequent Character Difference
Tests whether a candidate can use hash counting to find the pair of distinct characters whose absolute frequency difference is largest in a given string.
Arrays & Hashingarrays & hashinghash countingstrings - Linked ListsMediumAuto-gradedInterleave Two Halves of a Linked List (Array Form)
Tests pointer-manipulation thinking by reordering a node list so that the first half and reversed second half are interleaved, all represented as arrays of values.
Linked Listslinked listtwo pointersarray manipulation - Arrays & HashingEasyAuto-gradedLongest Subarray with Sum At Most K
Tests the ability to apply a sliding window to find the longest contiguous subarray whose element sum does not exceed a given limit.
Arrays & Hashingarrayssliding windowprefix sums - Greedy & IntervalsMediumAuto-gradedMaximize Completed Jobs with Deadlines
Tests greedy scheduling with deadlines: select and order unit-length jobs to maximize total profit, applying an exchange argument to prove optimality.
Greedy & Intervalsgreedyschedulingsorting - Greedy & IntervalsMediumAuto-gradedMaximum Simultaneous Room Bookings
Tests the sweep line technique on interval scheduling to find the peak number of overlapping room bookings over a timeline.
Greedy & Intervalssweep lineintervalsgreedy - Linked ListsMediumAuto-gradedMerge K Sorted Linked-List Runs Into One
Tests pointer manipulation by merging k sorted singly-linked-list segments (given as flat lists with run boundaries) into a single sorted list without allocating extra nodes.
Linked Listslinked listsmergesortingpointer manipulation - Heaps, Sorting & SearchMediumAuto-gradedMinimize Maximum Delivery Time Across Warehouses
Tests binary search on the answer to find the minimum possible maximum delivery time when assigning shipments to warehouses with limited daily capacity.
Heaps, Sorting & Searchbinary searchgreedysorting - Greedy & IntervalsMediumAuto-gradedMinimize Maximum Job Lateness with Deadlines
Tests the classic exchange-argument greedy insight: scheduling jobs by earliest deadline minimizes the maximum lateness over all jobs.
Greedy & Intervalsgreedyintervalssortingexchange-argument - Trees & GraphsMediumAuto-gradedMinimum Build Phases for a Software Dependency Graph
Tests whether a candidate can apply topological ordering (Kahn's algorithm / BFS layer-by-layer) to schedule tasks into the fewest sequential build phases.
Trees & Graphsgraphstopological sortBFSDAG - Dynamic ProgrammingHardAuto-gradedMinimum Cost to Merge Stone Piles
Tests interval DP by finding the minimum total cost to merge an array of stone piles into one, where merging any contiguous segment costs the sum of that segment.
Dynamic Programmingdynamic programminginterval DPmemoization - Dynamic ProgrammingEasyAuto-gradedMinimum Cost to Type a String on a Circular Keyboard
Tests string DP by computing the minimum total movement cost to type a target string on a circular letter wheel, starting from a given letter.
Dynamic Programmingdynamic programmingstring DPgreedy - Arrays & HashingHardAuto-gradedMinimum Window Containing All Balanced Bracket Types
Tests ability to use hash counting with a sliding window to find the shortest contiguous subarray that contains at least k complete pairs of each bracket type.
Arrays & Hashingarrayshash mapsliding windowtwo pointers - Stacks & QueuesEasyAuto-gradedNext Warmer Day in a Temperature Log
Tests the ability to use a monotonic stack to efficiently find, for each day, how many days until a strictly warmer temperature is recorded.
Stacks & Queuesstackmonotonic stackarray - StringsEasyAuto-gradedParse and Evaluate Simple Arithmetic Tokens
Tests the ability to tokenize a raw arithmetic string into numbers and operators, then evaluate left-to-right respecting only + and - operations.
Stringsstringstokenizingparsing - Arrays & HashingMediumAuto-gradedPartition Array by Parity of Frequency
Tests in-place partitioning using a hash map to precompute element frequencies, then a two-pointer scheme to rearrange elements without extra array allocation.
Arrays & Hashingarrayshash mapstwo pointersin-place partitioning - Arrays & HashingMediumAuto-gradedPartition Array Into Alternating Parity Groups
Tests in-place partitioning by rearranging an integer array so all even-indexed positions hold even numbers and all odd-indexed positions hold odd numbers, without allocating a new array.
Arrays & Hashingarraystwo pointersin-place partitioning - StringsMediumAuto-gradedPeak Occurrence Count of a Bounded Substring
Tests whether a candidate can reduce a multi-length sliding-window problem to a single window size and efficiently track distinct-character counts.
Stringssliding-windowhash-mapstrings