practice a little every day — you've got this ♡
Coding Interview Problems
Practice 5971 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.
- 5971
- Problems
- 2211
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 2671–2700 of 2761 results
- 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 - Stacks & QueuesEasyAuto-gradedPrint Queue Page Order Simulator
Tests queue simulation by modeling a shared printer that interleaves multi-page jobs across rounds, returning the final page-output order.
Stacks & Queuesqueuesimulationarrays - Stacks & QueuesHardAuto-gradedReconstruct Function Entry/Exit Events from Call Stack Snapshots
Tests ability to compute positional diffs between consecutive call stack snapshots and emit correctly ordered START/END events using a stack-based mental model.
Stacks & Queuesstacksimulationstring manipulation - Trees & GraphsMediumAuto-gradedSchedule Dependent Tasks with Priority and Tag Exclusion
Tests Kahn's algorithm with deterministic tie-breaking, urgency-based heap ordering, cycle detection with path reporting, and transparent skipping of tag-excluded tasks.
Trees & Graphstopological-sortheapgraphs - Heaps, Sorting & SearchMediumAuto-gradedSchedule Tasks by Deadline and Priority
Tests the ability to sort a list of tasks using a multi-key custom comparator involving deadlines, priorities, and tie-breaking rules.
Heaps, Sorting & Searchsortingcustom sort keysheaps - StringsEasyAuto-gradedShortest Palindromic Superstring by Suffix–Prefix Overlap
Tests understanding of palindromic structure by finding the minimum characters to append to a string to make the whole string a palindrome.
Stringsstringspalindrometwo pointers - StringsMediumAuto-gradedShortest Substring Containing All Required Characters
Tests the sliding window pattern with frequency counting to find the shortest substring of one string that covers every character (with multiplicity) of another.
Stringssliding-windowhash-maptwo-pointers - Stacks & QueuesHardAuto-gradedSimulate a Multi-Lane Toll Plaza Queue
Tests queue simulation skills by modeling vehicles routing through toll lanes with dynamic overflow and lane-closing logic.
Stacks & Queuesqueuesimulationgreedy - Data Structure DesignMediumAuto-gradedSliding-Window Rate Limiter Over Event Timestamps
Tests the ability to implement a sliding-window rate limiter that, given a log of request timestamps, determines which requests are allowed under a fixed-window capacity.
Data Structure Designdata structuresrate limitersliding window - Data Structure DesignHardAuto-gradedStateful Activity Window Aggregation Over an Event Stream
Tests whether a candidate can maintain per-user rolling time windows over a chronologically ordered stream and emit aggregated records incrementally without buffering the whole input.
Data Structure Designhash-mapsimulationstreamingaggregation - Trees & GraphsMediumAuto-gradedSum of Decimal Paths in a Binary Tree
Tests depth-first (or breadth-first) traversal of a binary tree while tracking the accumulated digit value along each root-to-leaf path.
Trees & Graphsbinary-treebfsdfs - Math & Bit ManipulationMediumAuto-gradedSum of Digits Across All Bases from 2 to K
Tests ability to repeatedly convert an integer into multiple bases and accumulate digit sums, combining base-conversion mechanics with modular arithmetic.
Math & Bit Manipulationmathbit manipulationbase conversion