practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6003 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.
- 6003
- Problems
- 2223
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 2161–2190 of 2777 results
- Arrays & HashingEasyAuto-gradedExpected Coin Flips to Observe Heads Then Tails
Tests ability to model a probabilistic process with states and solve expectation equations.
Arrays & Hashingprobabilityexpected-valuemarkov-chains - Data Structure DesignMediumAuto-gradedPriority Queue Scheduler + Expression Evaluator
Tests heap-based priority scheduling with tie-breaking and recursive-descent expression parsing with variable substitution.
Data Structure Designheapparsingdesign - Arrays & HashingMediumAuto-gradedSample Mean: Expected Value and Variance Under Correlation
Tests ability to compute the expected value and variance of a sample mean when observations share a common correlation, plus limiting behavior in boundary cases.
Arrays & Hashingstatisticsprobabilityexpected-valuevariance - Greedy & IntervalsMediumAuto-gradedConsolidate Overlapping Time Ranges
Tests whether a candidate can sort and scan a list of closed intervals to collapse all overlapping or touching ranges into a minimal merged set.
Greedy & Intervalsintervalssortinggreedy - Math & Bit ManipulationMediumAuto-gradedCount Subsequences With Uniform Letter Frequency
Tests combinatorics, modular arithmetic, and frequency grouping by counting index-distinct subsequences where every included letter appears the same number of times.
Math & Bit Manipulationcombinatoricsmodular arithmeticfrequency counting - Greedy & IntervalsMediumModel answerPeak Active Couriers: Sweep-Line with Per-Worker Deduplication
Given delivery records with overlapping intervals per courier, find the maximum number of distinct couriers working simultaneously using a sweep-line algorithm.
Greedy & Intervalssweep-lineintervalsdeduplicationsorting - Heaps, Sorting & SearchMediumAuto-gradedFind K Closest Elements in Sorted Array
Tests binary search on sorted arrays to locate a contiguous window of k elements with minimum distance to a target value.
Heaps, Sorting & Searchbinary-searchtwo-pointerssliding-window - Data Structure DesignMediumAuto-gradedRate Limiter with Bucket Drain Simulation
Tests ability to model a rate-limiting algorithm with time-based decay, capacity bounds, and precise edge-case handling.
Data Structure Designrate-limitingsimulationstate-machine - Arrays & HashingHardAuto-gradedFind All Contiguous Segments with Target Total
Tests prefix sum tracking with hash maps to efficiently count all contiguous subsequences that sum to a target value.
Arrays & Hashingprefix-sumhash-maparray - Greedy & IntervalsMediumAuto-gradedMinimum Classrooms to Schedule All Lectures
Tests whether a candidate can reframe a resource-allocation problem as peak interval overlap and handle half-open boundary conditions correctly.
Greedy & Intervalsintervalssweep-linegreedysorting - Stacks & QueuesMediumAuto-gradedCompute Arithmetic Expression with Operator Precedence
Tests parsing and evaluating mathematical expressions with proper operator precedence and parentheses using stack-based techniques.
Stacks & Queuesstacksexpression-parsingoperator-precedence - Data Structure DesignMediumModel answerDesign a Shopping Cart with OOP: Catalog, Lines, and Totals
Model a shopping cart in object-oriented code: add, update, and remove items, compute an exact total, and handle edge cases consistently.
Data Structure Designobject-oriented designpythonmoney arithmetic - Data Structure DesignMediumAuto-gradedSimulate a Cache with Recency-Based Eviction
Tests data structure design by building an in-memory cache that removes the least recently accessed entry when full.
Data Structure Designhash-maplinked-listcacheeviction-policy - Data Structure DesignMediumAuto-gradedCount-Weighted Random Sampling with Dynamic Insertions and Removals
Design a multiset supporting constant-time insert, remove, and random selection where each element's pick probability is proportional to its frequency.
Data Structure Designhash-maparraysrandomizationdata-structure-design - Arrays & HashingEasyAuto-gradedDaily-Deal Voucher: Restaurant Profit & Break-Even Analysis
Tests whether you can build a contribution-margin model for a voucher partnership, solve break-even and sensitivity equations, and decompose a profit change into its drivers.
Arrays & Hashingunit economicscontribution marginbreak-even analysis - Trees & GraphsMediumAuto-gradedMinimum Hops Between Nodes in a Matrix-Represented Graph
Tests ability to implement BFS on an undirected unweighted graph stored as an adjacency matrix to find the fewest edges between two nodes.
Trees & Graphsgraphsbfsadjacency-matrix - Trees & GraphsMediumAuto-gradedMinimum Collections to Link Two Items
Tests bipartite graph traversal and BFS to find shortest paths alternating between items and their containing collections.
Trees & Graphsgraph-theorybfsbipartite-graph - Data Structure DesignMediumAuto-gradedSimulate a Stack with Instant Maximum Access
Tests data structure design skills by building a stack that supports O(log n) max retrieval and removal, including removal from the middle when duplicates exist.
Data Structure Designstackheaplinked-listlazy-deletion - Greedy & IntervalsMediumAuto-gradedFill a Cargo Hold for Maximum Value With Limited Item Supply
Tests whether a candidate can recognize that a bounded knapsack with uniform item weight reduces to a greedy sort-and-fill, handling large capacities and stock counts efficiently.
Greedy & Intervalsgreedysortingbounded-knapsack - Data Structure DesignMediumAuto-gradedExecute Banking Operations with Transaction History
Tests command-pattern operation execution, input validation, atomic state transitions, and maintaining per-entity audit logs.
Data Structure Designsimulationvalidationstate-management - Stacks & QueuesMediumAuto-gradedConcert Venue Ticketing with Capacity and a Waiting Line
Tests event-driven simulation skills: tracking visitor state, enforcing a seating capacity, managing a FIFO waitlist, and collecting one-time entry fees.
Stacks & Queuessimulationqueuehash-set - Data Structure DesignMediumAuto-gradedBuild a Multi-User File System with Quotas and Compression
Design an in-memory file manager tracking per-user storage limits, file operations, pattern matching, and size adjustments with atomic quota enforcement.
Data Structure Designhash-tablessimulationdesign - Data Structure DesignHardModel answerMemoization Cache: Key Design and Write-Ahead Log Recovery
Build a Python LRU memoization cache with correct argument-key normalization, then add crash recovery via an append-only log with torn-write handling.
Data Structure Designlru-cachememoizationcrash-recoverywrite-ahead-log - Dynamic ProgrammingHardAuto-gradedCount Sorted Sequences Matching Per-Position Digit Sums
Tests dynamic programming over value buckets with a two-pointer prefix-sum transition to count sorted integer sequences under a digit-sum constraint.
Dynamic Programmingdynamic-programmingarraysmath-bits - Data Structure DesignMediumModel answerBuild a List with a Tracking Cursor
Design a mutable list with a cursor that stays attached to its element as items are inserted, removed, or relocated within the collection.
Data Structure Designdata-structuresinvariantsapi-designcomplexity-analysis - StringsMediumAuto-gradedHighest Frequency Letter with Alphabetical Tie-Breaking
Tests efficient character frequency counting and consistent tie-breaking using fixed-size auxiliary space.
Stringsstringsarraysfrequency-counting - Math & Bit ManipulationMediumAuto-gradedLongest Non-Overlapping Character Chain
Tests backtracking or bitmask optimization to select a subset of strings whose combined characters are all distinct.
Math & Bit Manipulationbacktrackingbit-manipulationrecursion - StringsMediumAuto-gradedFix a Row-to-CSV Converter: Output Correctness and Efficiency
Tests whether a candidate can spot a trailing-comma output bug and a quadratic string-building performance problem, then write a correct, efficient fix.
Stringsstringsperformancejoins - Arrays & HashingEasyAuto-gradedTight Probability Bounds for the Union of Two Events
Tests whether a candidate can derive the Fréchet bounds on P(A ∪ B) given only the marginal probabilities of two events with unspecified dependence.
Arrays & Hashingprobabilityboundsinclusion-exclusion - Arrays & HashingEasyAuto-gradedMean Distinct Item Count Per Group
Tests ability to deduplicate items within groups, handle null values, and compute aggregated metrics with proper rounding.
Arrays & Hashinghash-mapsetaggregationdata-processing