practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6025 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.
- 6025
- Problems
- 2231
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 1831–1860 of 2784 results
- Arrays & HashingMediumAuto-gradedCheck for Subarray Summing to Target
Tests the ability to use prefix sums and a hash set to detect whether any contiguous slice of an array sums to a given value.
Arrays & Hashingprefix-sumhash-setsubarray - Arrays & HashingMediumAuto-gradedLocate Symbol-Structure Templates in a Number Grid
Tests whether a candidate can slide a letter-template over an integer grid and detect every position where symbols and values form a valid one-to-one correspondence.
Arrays & Hashinghash-mappattern-matchingmatrixisomorphism - Arrays & HashingHardAuto-gradedBayesian Coin Identification from Flip Observations
Compute exact posterior probabilities over three weighted coins from a sequence of flips, plus the predictive probability the next flip is heads.
Arrays & Hashingbayes-theoremprobabilityfractionsposterior-predictive - Data Structure DesignEasyAuto-gradedBuild a Fixed-Capacity Recency-Ordered Cache
Tests whether you can design a cache that evicts the least-recently-touched entry in O(1) time using a hash map paired with an ordered structure.
Data Structure Designhash-maplinked-listcacheOrderedDict - Data Structure DesignMediumAuto-gradedUnified Entity Log with Mergeable ID Groups
Tests ability to design a data structure that resolves multiple system-assigned IDs to a single entity and returns a chronologically merged observation history.
Data Structure Designunion-finddesignsorting - Greedy & IntervalsEasyAuto-gradedBudget Shopping from Array Suffix
Tests greedy selection with precomputation, prefix sums, and binary search to maximize item counts under budget constraints.
Greedy & Intervalsgreedybinary-searchprefix-sumsorting - Data Structure DesignMediumAuto-gradedTwo-Way Link Mapper: Shorten and Restore URLs
Tests ability to design a bidirectional hash map structure that assigns stable short identifiers to long URLs and retrieves originals in O(1).
Data Structure Designhash-mapdesignstrings - Math & Bit ManipulationHardModel answerDo Two Walkers Ever Share the Same Tile?
Determine if two entities moving on an infinite 2D grid ever occupy the same cell at the same integer time step.
Math & Bit Manipulationgeometrysimulationinterval-arithmetictwo-pointers - 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 - Arrays & HashingEasyModel answerIdentify the Most Common Function Call in Application Logs
Determine which function name occurs most often in a list of log entries and report its occurrence count.
Arrays & Hashinghash-mapfrequency-countingiteration - 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 - StringsMediumModel answerRule Engine with Operator Precedence and Quoted Strings
Build a transaction filter that evaluates accept/block rules in sequence, supporting field equality, boolean logic, AND/OR operators, and parentheses.
Stringsparsingstring-matchingoperator-precedencetokenization - 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 - Arrays & HashingMediumModel answerThree-Problem Algorithmic Challenge Set
Solve three independent problems: tournament match counting, grid traversal with movement commands, and finding maximum sum of digit-disjoint pairs.
Arrays & Hashingsimulationgraph-traversalbit-manipulationdfs - StringsMediumModel answerBuild a CSV Parser from Scratch with Corruption Handling
Write a from-scratch CSV tokenizer and data structure for downstream consumers, then extend it to handle rows with missing or extra fields.
Stringsparsingcsvstring-manipulationerror-handling - 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 - Data Structure DesignMediumModel answerBuild a Weighted Consistent Hash Ring
Design and code a hash ring that maps keys to servers with virtual nodes, supporting weighted capacity and minimal key movement on topology changes.
Data Structure Designhashingdistributed-systemsdata-structuresbinary-search - 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 - Data Structure DesignMediumModel answerDependency-Aware Job Scheduler with Priority Queues
Build an in-memory scheduler that tracks job prerequisites, selects the next runnable job by a four-field priority rule, supports filtered queries, and detects deadlocks.
Data Structure Designheaptopological-sortgraphsimulation - 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 - Data Structure DesignMediumModel answerContinuous-Batch Inference Loop with Slot Refilling
Implement a dynamic batching generation loop that keeps a fixed-size batch full by refilling completed slots from a waiting queue until all requests are served.
Data Structure Designbatchinginferencesimulationqueue - 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 - Data Structure DesignMediumModel answerModel a Prepaid Spending Account with Transaction Limits
Design a class hierarchy that tracks a spending cap, running balance, and transaction history while safely handling concurrent charges and edge-case inputs.
Data Structure Designobject-oriented designconcurrencystate managementPython - StringsMediumModel answerRule-Driven CSV Validator with Cross-Field Word Overlap
Design and implement a configurable validator that flags per-field rule violations and excessive word overlap across fields in a company CSV.
Stringscsv-parsingvalidationstring-normalizationrule-engine