practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6002 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.
- 6002
- Problems
- 2223
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 1591–1620 of 2123 results
- Data Structure DesignMediumAuto-gradedCircular Buffer Deque with Auto-Resize
Tests ability to build a double-ended queue on a ring-indexed array that doubles in capacity when full, keeping all operations amortized O(1).
Data Structure Designdequecircular-arrayamortized-analysis - Linked ListsMediumAuto-gradedOrdered Stage Queue: Simulate Item Promotion and Demotion
Tests whether a candidate can model item movement across ordered stages using a normalized O(1)-per-move doubly linked list structure.
Linked Listslinked-listsimulationdesign - Trees & GraphsMediumAuto-gradedLexicographic Topological Sort of a Task Graph
Tests directed graph construction, cycle detection via Kahn's algorithm, and deterministic tie-breaking with a min-heap to produce the lexicographically smallest valid ordering.
Trees & Graphstopological-sortgraphsheaps - Stacks & QueuesEasyAuto-gradedValidate Nested Chemical Formula Brackets
Tests bracket matching with domain-specific pairing rules where round, square, and curly brackets each have distinct valid nesting constraints.
Stacks & Queuesstacksbracket matchingsimulationstrings - Heaps, Sorting & SearchMediumAuto-gradedBusiest Conference Room Tracker
Tests the ability to simulate event scheduling with delayed assignments using two priority queues to track which resource handles the most requests.
Heaps, Sorting & Searchheapsimulationgreedypriority-queue - Trees & GraphsMediumAuto-gradedCount Landlocked Islands
Tests connected-component detection in grids with boundary constraints using BFS or DFS traversal.
Trees & Graphsbfsdfsconnected-componentsgrid-traversal - Greedy & IntervalsMediumAuto-gradedConsolidate Overlapping Ranges
Tests interval merging logic, correctly handling touching boundaries, nested ranges, and producing sorted disjoint output.
Greedy & Intervalsintervalssortinggreedy - Arrays & HashingMediumAuto-gradedRotate a Square Matrix 90° Clockwise In Place
Tests whether a candidate can transform an n×n grid in place using transpose and row-reversal, with no extra matrix allocated.
Arrays & Hashingmatrixin-placetwo-pointer - Greedy & IntervalsMediumAuto-gradedFewest Irrigation Devices to Water a Linear Garden
Tests greedy interval selection and the ability to handle coverage gaps in a linear range.
Greedy & Intervalsgreedyintervalssorting - Arrays & HashingMediumAuto-gradedSample Size Calculator for Two-Proportion Z-Test
Tests ability to implement statistical power calculations for comparing two binary outcome rates in experimental design.
Arrays & Hashingexperimentationstatisticspower-analysis - Data Structure DesignMediumAuto-gradedBuild a Time-Aware Key-Value Store with Expiration Logic
Tests data structure design, time-based expiration semantics, and clean handling of missing or stale entries in an in-memory cache.
Data Structure Designhash-tabletime-simulationexpirationcache-design - Arrays & HashingMediumAuto-gradedRotation Distance: Sum Absolute Differences Across All Shifts
Tests array rotation mechanics, computing position-wise absolute differences for every cyclic offset, and returning results in sorted order.
Arrays & Hashingarraysrotationsorting - Trees & GraphsMediumAuto-gradedBuild a Visual Directory Tree from Nested Dictionary
Tests recursion, dictionary traversal, and string formatting to produce an indented tree structure with box-drawing connectors.
Trees & Graphsrecursiontree-traversalstringsformatting - Arrays & HashingMediumAuto-gradedContiguous Subarray Sum Count
Tests prefix sum technique with hash maps to count subarrays matching a target sum in linear time
Arrays & Hashingprefix-sumhash-mapsubarray - Greedy & IntervalsMediumAuto-gradedConsecutive-Range Handoff Pairs for Interval Coverage
Tests interval reasoning and efficient pairing: find all unordered listing pairs whose consecutive availability windows together cover a full date range.
Greedy & Intervalsintervalsbinary-searchhashingsorting - Greedy & IntervalsMediumAuto-gradedTrack Segment Coverage by Expanding Intervals
Tests interval merging and coverage detection with streaming data updates.
Greedy & Intervalsintervalsmerge-intervalsdata-structuresstreaming - Heaps, Sorting & SearchMediumAuto-gradedTop-K Price Harvest from Tiered Stock Levels
Tests whether a candidate can reformulate a greedy revenue problem into summing the largest elements across union-of-range price sets and implement an O(n log n) layer-sweep solution.
Heaps, Sorting & Searchgreedysortingmath - Data Structure DesignMediumAuto-gradedDigit Hand Showdown
Classify numeric hands by frequency patterns with custom ranking, then break ties using positional comparison without sorting.
Data Structure Designobject-oriented-designpattern-matchingextensibility - StringsHardAuto-gradedGroup Anagram Chains by Transformation Distance
Tests anagram grouping combined with string parsing and multi-key sorting to build and rank clusters of anagrammatically related words from a structured input.
Stringsstringsanagram groupingsortingparsing - Dynamic ProgrammingMediumAuto-gradedMaximum Profit Under Capacity Constraint
Tests understanding of 0/1 knapsack disguised by a misleading ordering constraint that is actually always satisfiable.
Dynamic Programmingknapsackdynamic-programminggreedy - Dynamic ProgrammingMediumAuto-gradedPartition Items Into Bins With Limited Capacity
Tests the classic bounded knapsack variant where you must determine the minimum number of identical bins needed so each bin's total weight stays within a capacity, using DP to check feasibility.
Dynamic Programmingdynamic programmingknapsackmemoization - Data Structure DesignMediumAuto-gradedSession Key Manager with Deferred Cleanup
Tests building a session-key store with TTL-based lazy eviction using a hash map and min-heap to process a sequence of operations.
Data Structure Designheaphash-maplazy-deletionsimulation - Data Structure DesignMediumAuto-gradedFind Unreceived IDs in a Sequential Stream
Tests efficient gap tracking in a sequential ID space using sets and amortized range updates.
Data Structure Designsetrange-trackingamortized-analysis - Arrays & HashingMediumAuto-gradedIdentify All Projects with Maximum Team Size
Group assignment pairs by project, count members per project, and return every project tied for the largest team.
Arrays & Hashingarrayshashinggroupingcounting - Arrays & HashingMediumAuto-gradedMinimum Operations to Equalize Array by Selective Increments
Tests insight that incrementing all-but-one is equivalent to decrementing one, leading to a sum-based formula instead of simulation.
Arrays & Hashingmatharraysgreedy - 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