practice a little every day — you've got this ♡
Coding Interview Problems
Practice 6005 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.
- 6005
- Problems
- 2225
- Auto-graded
- 15
- Topics
- 273
- Added today
Showing 1531–1560 of 2125 results
- Stacks & QueuesMediumAuto-gradedSkyline Visible Buildings Count
Tests ability to use a monotonic stack to count, for each building, how many previous buildings are visible looking back from it along a city skyline.
Stacks & Queuesmonotonic stackarrayssimulation - StringsMediumAuto-gradedBuild a Token Merger with Threshold-Based Pair Consolidation
Tests implementation of a stateful tokenizer that learns merge operations by iteratively combining frequent adjacent pairs, then applies those rules to encode and decode text.
Stringstokenizationgreedystate-management - Arrays & HashingMediumAuto-gradedBest Subarray Sum in a Tiled Sequence
Tests whether a candidate can extend Kadane's algorithm to a sequence formed by repeating an array k times, handling boundary crossings and all-negative inputs.
Arrays & Hashingkadanesubarraygreedy - Trees & GraphsMediumAuto-gradedVirus Spread on a Grid
Tests multi-source BFS on a 2D grid to find the minimum number of rounds for an infection to reach every susceptible cell, or detect if it cannot.
Trees & Graphsbfsmatrixmulti-source - Arrays & HashingMediumAuto-gradedBest Sum of Extremes in a Contiguous Subarray
Tests whether a candidate can reduce an O(n²) subarray search to a single linear scan by proving that adjacent pairs always dominate longer windows.
Arrays & Hashingarraysgreedysliding-window - Data Structure DesignMediumAuto-gradedGroup Expense Balancer: Greedy vs Optimal Settlement
Tests ability to implement both a greedy two-pointer debt-clearing algorithm and an exact minimum-transaction settlement using memoized recursion.
Data Structure Designgreedymemoizationsimulation - StringsMediumAuto-gradedScore Tasks From Event Log Strings
Parse "id:command" log lines, accumulate weighted scores per task with a hash map, and keep only tasks that completed.
Stringsstringshash-mapsimulationparsing - Math & Bit ManipulationMediumAuto-gradedBalance Integer Values to Minimize Spread
Tests understanding of integer division, remainder distribution, and handling negative numbers in a fairness optimization problem.
Math & Bit Manipulationmathgreedydivisionedge-cases - StringsMediumAuto-gradedCount Sliding Windows Matching a Step-Direction Sequence
Tests whether a candidate can reduce pairwise comparisons to a sign sequence and count all overlapping pattern matches in linear time using KMP.
Stringsstring-matchingkmparrayssliding-window - StringsEasyAuto-gradedGrid Walker: Did the Drone Return to Base?
Tests whether a candidate can simulate 2D movement on a grid and determine if a sequence of directional steps nets zero displacement.
Stringsstringssimulationmath-bits - Trees & GraphsMediumAuto-gradedEarliest-Arrival Reachability on Timed Transit Routes
Tests whether a candidate can model time-respecting graph search over indexed transit routes to determine if a destination is reachable from a starting stop.
Trees & Graphsgraph searchBFSgreedyshortest path - Arrays & HashingMediumAuto-gradedThree Independent Array Challenges
Tests greedy gain selection, modular triplet counting, and DP-based longest flexible non-decreasing subarray in one combined function.
Arrays & Hashinggreedydynamic-programmingcombinatorics - Dynamic ProgrammingMediumAuto-gradedBest Revenue from Selling Rod Segments
Tests dynamic programming by finding the optimal way to partition a rod into segments to maximize total selling price.
Dynamic Programmingdynamic-programmingoptimizationunbounded-knapsack - Greedy & IntervalsEasyAuto-gradedConsolidate Overlapping Time Ranges by Group
Tests interval merging within distinct groups, requiring grouping logic, sorting, and adjacent-interval handling.
Greedy & Intervalsintervalsgroupingsorting - Trees & GraphsMediumAuto-gradedCheapest Type Transformation Path
Tests shortest-path reasoning on a weighted directed graph, including source-caching strategy, zero-cost edges, unreachable nodes, and same-source queries.
Trees & Graphsgraphsshortest-pathdijkstra - Trees & GraphsMediumAuto-gradedOptimal Empty Cell with Minimum Path Distance Sum
Tests multi-source BFS to find an empty cell minimizing total shortest-path distance to all targets on a grid with obstacles.
Trees & Graphsbreadth-first-searchgraphsgrid-traversal - Data Structure DesignMediumAuto-gradedSnapshot Reads from a Multi-Version Key-Value Log
Tests whether you can design a versioned key-value store that answers "what was the value at time T?" in sub-linear time using binary search on per-key version histories.
Data Structure Designbinary-searchhash-tabledesign - Trees & GraphsMediumAuto-gradedBuild Travel Route from Airline Tickets
Tests directed graph traversal, Eulerian path construction, and lexicographical ordering with Hierholzer's algorithm.
Trees & Graphsgraphsdfseulerian-pathbacktracking - Greedy & IntervalsMediumAuto-gradedGreedy Starting Point for a Circular Fuel Route
Tests whether a candidate can apply a greedy one-pass argument to find the unique valid departure station in a circular gas-station problem.
Greedy & Intervalsgreedyarraystwo-pointers - Arrays & HashingMediumAuto-gradedLargest Manhattan Distance of Aligned Subsequences
Tests identifying that all-nonnegative distance terms let you reduce the search to complete diagonal overlaps, requiring quadratic iteration and overflow awareness.
Arrays & Hashingarraystwo-pointersmathoptimization - Trees & GraphsMediumAuto-gradedFlat Error Collection from a Recursive Schema Validator
Tests ability to traverse a nested schema definition, flatten heterogeneous check results, and enforce a consistent empty-list contract across all node types.
Trees & Graphsrecursionschema-validationflattening - Greedy & IntervalsMediumAuto-gradedConsolidate Overlapping Time Ranges
Tests whether a candidate can sort and linearly sweep a list of ranges to produce the minimal set of non-overlapping intervals covering all input.
Greedy & Intervalsintervalssortinggreedyarray - Trees & GraphsMediumAuto-gradedAlternating Direction Level Order Tree Traversal
Tests BFS traversal with directional output reversal per level without corrupting the queue structure.
Trees & Graphsbfsbinary-treelevel-orderqueue - Arrays & HashingMediumAuto-gradedLongest All-Ones Window After Limited Bit Flips
Tests the ability to reframe a flip problem as a sliding-window search and reason about amortized complexity.
Arrays & Hashingsliding-windowtwo-pointersarrays - Greedy & IntervalsMediumAuto-gradedConsolidate Overlapping Ranges
Tests interval merging with sorting, overlapping logic, and immutability constraints
Greedy & Intervalsintervalssortinggreedyarrays - Data Structure DesignMediumAuto-gradedWorker Pay Rate Ledger with Interval Cost Queries
Tests piecewise-constant function integration, lazy evaluation, and interval clipping inside a simulated in-memory billing system.
Data Structure Designdesignintervalssimulation - Trees & GraphsHardAuto-gradedCompute Division Chains from Given Ratios
Tests graph modeling of multiplicative relationships and pathfinding to derive transitive ratios between variables.
Trees & Graphsgraphbfsunion-find - Trees & GraphsMediumAuto-gradedMatch Documents Against Filter Expressions
Build a recursive evaluator for filter expressions with logical operators and field comparisons, testing tree traversal and nested field lookup.
Trees & Graphsrecursiontreesdictionaries - Data Structure DesignMediumAuto-gradedParcel Locker Manager with History Tracking
Build a locker allocation system that assigns the smallest free locker, validates pickups, and remembers the last package stored in each locker.
Data Structure Designheapsimulationdata-structure-design - Data Structure DesignHardAuto-gradedTimestamped Press-and-Release Event Classifier
Tests per-button state tracking and timing logic over an ordered event stream to classify completed press-release pairs by hold duration.
Data Structure Designhash-mapevent-streamstate-machine