practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6013 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.
- 6013
- Problems
- 2228
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 1381–1410 of 2127 results
- Heaps, Sorting & SearchMediumAuto-gradedFind a Value in a Shifted Sorted Array
Tests whether a candidate can run a single-pass binary search on a sorted array that has been cyclically shifted by an unknown offset.
Heaps, Sorting & Searchbinary-searcharraysdivide-and-conquer - Trees & GraphsMediumAuto-gradedLargest Label Spread Across Graph Clusters
Tests ability to find connected components in an undirected graph and compute the maximum difference between the highest and lowest node labels in any single component.
Trees & Graphsunion-findgraphsconnected-components - Arrays & HashingHardAuto-gradedBacktest a Mean-Reversion Trading System
Tests ability to implement a complete trading backtest with entry/exit logic, transaction costs, performance metrics, train/test splits, and statistical validation.
Arrays & Hashingbacktestingtime-seriesfinancesimulation - Arrays & HashingMediumAuto-gradedSequential Shape Placement on a Matrix
Tests matrix manipulation, collision detection, and ordered simulation by placing fixed shapes onto a grid.
Arrays & Hashingmatrixsimulationgreedy - StringsMediumAuto-gradedBuild All Balanced Bracket Sequences
Tests recursion with constraint-based pruning to construct valid nested bracket strings without generating invalid candidates.
Stringsrecursionbacktrackingcombinatorics - Arrays & HashingEasyAuto-gradedNext Red Card: Conditional Draw Probability
Tests conditional probability under sampling without replacement from a fixed-composition deck given observed draw history.
Arrays & Hashingprobabilitycombinatoricsconditional-probability - Math & Bit ManipulationMediumAuto-gradedDecode a Mixed-Radix Positional Number
Tests the ability to convert a number represented in a variable base-per-digit (mixed-radix) system back to its standard base-10 integer value.
Math & Bit Manipulationmathbase conversionnumber theory - StringsMediumAuto-gradedLongest Shared Leading-Digit Sequence Between Two Integer Lists
Tests whether a candidate can avoid brute-force pair comparison by exploiting bounded digit counts to match prefixes efficiently with a hash set.
Stringsstringsarrayshashing - Arrays & HashingMediumAuto-gradedSession-Based Account Risk Scoring with Bayesian Updates
Tests probabilistic modeling with the Binomial distribution, Bayes' theorem, two-stage classification pipelines, and F1-optimal threshold selection in a risk-scoring context.
Arrays & Hashingprobabilitybayes-theorembinomial-distribution - Arrays & HashingMediumAuto-gradedCompute Correlation from Three Variance Values
Tests whether a candidate can apply the variance-of-a-sum identity to extract correlation, and correctly handle the case where one variance is missing.
Arrays & Hashingstatisticsmathprobability - Trees & GraphsHardAuto-gradedShortest Supplier Chain Between Two Vendors
Tests BFS-based shortest-path traversal on an undirected graph, including path reconstruction and degree-of-separation counting with correct edge-case handling.
Trees & GraphsgraphsBFSshortest-path - Arrays & HashingEasyAuto-gradedProbability Inventory Covers Random Demand
Compute the binomial CDF: the chance that at most s of n independent customers request a limited item.
Arrays & Hashingprobabilitybinomial-distributioncombinatoricscdf - Arrays & HashingMediumAuto-gradedIdentify Customers With Unmet Service Needs
Tests spatial hashing and set union logic to find customers whose required service tags are not collectively offered by any nearby vendor within a radius.
Arrays & Hashingspatial-hashingset-operationsgrid-bucketing - Heaps, Sorting & SearchMediumAuto-gradedK-th Value in a Row-and-Column Sorted Grid
Tests binary search on value space combined with an O(n) staircase count to efficiently locate the k-th smallest element in a doubly sorted matrix.
Heaps, Sorting & Searchbinary-searchmatrixheap - Data Structure DesignMediumAuto-gradedSimulate a Bounded Cache That Forgets the Least-Used Entry
Tests O(1) design of a fixed-size recency-ordered cache: correct eviction order, recency refresh on reads and writes, and update-without-evict semantics.
Data Structure Designhash-maplinked-listcachedesign - Data Structure DesignMediumAuto-gradedOrder State Machine with Transition Validation
Tests finite state machine implementation with strict transition rules and rejection of invalid state changes.
Data Structure Designstate-machinevalidationdata-structures - StringsMediumAuto-gradedSum Two Large Numbers Represented as Digit Strings
Tests manual digit-by-digit addition with carry propagation on arbitrarily large integers stored as strings.
Stringsstring-manipulationmathsimulation - Dynamic ProgrammingMediumAuto-gradedSum of All-One Squares in a Binary Grid
Tests dynamic programming on 2D grids by computing the total count of square submatrices containing only ones.
Dynamic Programmingdynamic-programmingmatrices2d-dp - Arrays & HashingMediumAuto-gradedK-th Missing Positive and Sliding-Window Duplicate Events
Tests order-statistics reasoning for k-th missing positive integers and time-window frequency tracking to detect repeated log events.
Arrays & Hashingarrayssortingsliding-window - Arrays & HashingEasyAuto-gradedRepeated Values and Longest Two-Distinct Subarray
Tests hash-based duplicate detection alongside a sliding window that finds the longest subarray containing exactly two distinct integer values.
Arrays & Hashingsliding-windowhashingtwo-pointers - Data Structure DesignMediumAuto-gradedVariable Registry With Deep Reference Expansion and Cycle Detection
Tests recursive variable substitution with memoization, cycle detection across direct and indirect references, and clean handling of undefined variable references.
Data Structure Designstringsrecursionhash-mapcycle-detection - Data Structure DesignMediumAuto-gradedRunning Median via Dual-Heap Simulation
Tests whether a candidate can maintain a live median over an integer stream in O(log n) per insert using two heaps balanced around the midpoint.
Data Structure Designheapsdata-structure-designonline-algorithms - Math & Bit ManipulationEasyAuto-gradedFour Colleagues in a Row: Recover the Exact Standing Order
Tests constraint satisfaction and logical deduction by finding the unique left-to-right arrangement of four people from four positional clues.
Math & Bit Manipulationlogicconstraint-satisfactionbrute-forcepermutations - Arrays & HashingMediumAuto-gradedLeftmost Busiest Slot After Range Increments
Apply many inclusive range additions over a possibly huge array and return the index holding the largest total, breaking ties toward the smallest index.
Arrays & Hashingdifference-arrayprefix-suminterval-updatestie-break - Heaps, Sorting & SearchMediumAuto-gradedSelect Up to Three Books from Distinct Genres
Tests greedy optimization with category constraints, hash-map aggregation, and heap-based top-k selection.
Heaps, Sorting & Searchgreedyhashmapheapoptimization - Stacks & QueuesHardAuto-gradedSimulate a FIFO Queue with Two Stacks
Tests whether you can emulate first-in-first-out ordering using only two LIFO stacks and explain the amortized cost of each operation.
Stacks & Queuesstacksqueueamortized-analysis - Arrays & HashingMediumAuto-gradedAssign Minimum Consistent Ranks to Matrix Cells
Tests greedy assignment of ranks by processing elements in sorted order while maintaining row and column constraints.
Arrays & Hashingsortinggreedymatrix - Stacks & QueuesMediumAuto-gradedSingle-Threaded CPU: Exclusive Runtimes and Stack Snapshot
Tests stack simulation and interval reasoning by computing per-function exclusive execution time and reconstructing the active call stack at a query timestamp from a sorted event log.
Stacks & Queuesstacksimulationinterval-reasoning - Arrays & HashingMediumAuto-gradedLayer-by-Layer Matrix Traversal Without Extra Storage
Tests boundary-tracking traversal under strict space and immutability constraints, requiring careful handling of single-row and single-column edge cases.
Arrays & Hashingmatrixtraversalconstant-spaceboundary-tracking - Stacks & QueuesMediumAuto-gradedBracket Nesting Check and Rotating Cipher
Tests stack-based bracket validation and modular arithmetic to rotate lowercase letters circularly across the alphabet.
Stacks & Queuesstacksstringsmodular-arithmetic