practice a little every day — you've got this ♡
Coding Interview Problems
Practice 5974 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.
- 5974
- Problems
- 2212
- Auto-graded
- 15
- Topics
- 269
- Added today
Showing 511–540 of 650 results
- Data Structure DesignMediumModel answerAlphabet-Coverage Web Crawler with Rate Limiting
Build a crawler that prioritizes unvisited first-letters across a link graph while respecting a configurable requests-per-second ceiling.
Data Structure Designcrawlingrate-limitingpriority-queuededuplication - Data Structure DesignMediumModel answerFour Algorithm Problems: Graphs, Search, Simulation, and Design
Solve four independent problems covering Eulerian path reconstruction, timestamped key-value lookup, ray reflection simulation, and a high-throughput score tracker.
Data Structure Designgraphsbinary-searchsimulationdata-structure-design - Data Structure DesignHardModel answerBuild a Reference-Counted Pointer from Scratch in C++
Implement a class template SharedPtr<T> that manages heap object lifetime through reference counting, supporting copy, move, reset, and safe self-assignment.
Data Structure DesignC++RAIImemory managementtemplates - Data Structure DesignMediumModel answerExpiring Credit Wallet: Drain Soonest-Expiring First, Halt on Overdraft
Design an in-memory credit ledger that consumes the earliest-expiring balance first and permanently returns None after any overdraft.
Data Structure Designheapgreedysimulationexpiry - Data Structure DesignMediumModel answerBuild a Reference-Counted Smart Pointer in C++
Design and implement a shared ownership pointer with automatic memory management using reference counting and RAII principles.
Data Structure Designc++memory-managementraiimove-semantics - Data Structure DesignMediumModel answerBuild a nested namespace tree from dotted model parameter names
Convert a flat list of dotted parameter keys like layer indices into a grouped nested dictionary, collecting nonconforming, duplicate, and structurally conflicting keys separately.
Data Structure Designstringshashingtrieedge-cases - Math & Bit ManipulationMediumModel answerCompute Sum of Divisible Integers Using Inclusion-Exclusion
Find the total of all positive integers below n divisible by 3, 5, or 7 in constant time using arithmetic series and inclusion-exclusion.
Math & Bit Manipulationinclusion-exclusionarithmetic-seriesnumber-theory - Dynamic ProgrammingMediumModel answer0/1 Knapsack: Space-Efficient DP with Item Recovery
Implement a weight-capacity optimizer returning max value and an exact item set, using O(W) space DP, then extend to unbounded and bounded variants.
Dynamic Programmingdynamic-programmingknapsackreconstructionoptimization - Data Structure DesignMediumModel answerBuild a Thread-Safe Future: Chaining and Parallel Fan-In
Implement a generic async future primitive supporting blocking get, callback chaining, and a barrier that resolves when all parallel futures complete.
Data Structure Designconcurrencyfuturesthreadingcallbacks - Trees & GraphsMediumModel answerSearch and Shortest-Path Algorithms
Implement binary search on a monotone predicate, BFS for state-space and grid shortest paths, and random board generation with adjacency counting.
Trees & Graphsbinary-searchbfsshortest-pathgraph-traversal - Data Structure DesignMediumModel answerMulti-Level Parking Facility: Class Structure and Operations
Model a parking facility with levels and sized spots, supporting vehicle entry/exit, spot allocation by compatibility, and availability queries.
Data Structure Designobject-oriented-designSOLID-principlesdesign-patternsclass-modeling - Dynamic ProgrammingMediumModel answerFlappy Bird Auto-Pilot with Lookahead Planning
Design a physics-based agent that decides when to jump by projecting future trajectories and checking collision-free paths through upcoming obstacles.
Dynamic Programminggame-physicssimulationtrajectory-planning - Data Structure DesignMediumModel answerAsync Query Client for a Cloud Data Warehouse
Design and implement a lightweight client that submits async SQL queries, polls for status, retrieves results, and handles errors and credentials safely.
Data Structure Designapi-designasyncerror-handlingstate-machine - Data Structure DesignMediumModel answerBuild a Time-Travel Key-Value Store with Snapshots
Design a key-value store that supports cheap snapshots and historical reads without copying the entire map on each snapshot.
Data Structure Designsnapshotsversioningbinary-searchcopy-on-write - Data Structure DesignHardModel answerBuild a thread-safe sliding-window percentile monitor
Implement a concurrent data structure that tracks latency measurements and computes approximate percentiles over a rolling time window with bounded memory.
Data Structure Designconcurrencypercentileshistogramsliding-window - Data Structure DesignMediumModel answerOrder Fulfillment Engine with Backorder Queue
Process a stream of orders and restocks against live inventory, fulfilling backorders in arrival order before replenishing on-hand stock.
Data Structure Designhash-mapqueuesimulationamortized-analysis - Data Structure DesignMediumModel answerDesign a Money Transfer System with Pending Approvals
Build an in-memory banking service supporting accounts, transaction history, and two-party transfers that only settle when the recipient explicitly accepts.
Data Structure Designconcurrencyidempotencystate-machineobject-oriented-design - Data Structure DesignMediumModel answerIndentation-Aware Code Folding Engine
Build a class that collapses and restores indentation-defined code blocks, tracking nested fold state and remapping display line numbers after each operation.
Data Structure Designsimulationmonotonic-stackdata-structure-design - Data Structure DesignMediumModel answerShort-Circuit Async Boolean: Cancel Early, Return Fast
Implement an async function that resolves true the moment any concurrent task returns true, cancelling all remaining work immediately.
Data Structure Designasyncioconcurrencycancellationpython - Trees & GraphsHardModel answerLogical Inference Engine: TRUE, FALSE, or Undetermined
Build a function that classifies propositions as definitely true, definitely false, or undetermined given a set of facts and implication rules.
Trees & Graphsgraphimplication2-SATDFS - Data Structure DesignMediumModel answerBuild an In-Memory Notebook System with Rollback
Design and implement a versioned in-memory notebook system supporting CRUD, case-insensitive search, user management, and full state rollback via a change log.
Data Structure Designversioningooprollbackhashmap - Data Structure DesignMediumModel answerReact Grid with Formula Dependencies and Virtual Rendering
Build a React component that displays a large editable grid, evaluates cell formulas with references, detects cycles, and renders only visible rows.
Data Structure Designreactvirtualizationmemoizationdependency-graph - Data Structure DesignHardModel answerO(1) Insert, Delete, and Fair Random Draw from a Live Set
Design a data structure that supports adding, removing, and uniformly sampling integer values, all in average O(1) time with no duplicates.
Data Structure Designhash maparrayrandomizationdata structure design - Data Structure DesignMediumModel answerJob Scheduler with Dependency Resolution
Build a thread-safe scheduler that accepts jobs with dependencies, identifies runnable jobs, and tracks state transitions through success and failure.
Data Structure Designstate-machinedependency-graphconcurrencysystem-design - Data Structure DesignMediumModel answerDesign a Formula Engine with Cycle Detection
Build a computation system where cells hold values or formulas referencing other cells, detecting circular dependencies before they corrupt state.
Data Structure Designgraphstopological-sortcycle-detection - Data Structure DesignMediumModel answerBuild a Tree System with LRU Cache and Command History
Design a data structure for a tree where nodes can be read, modified, and traversed, with an LRU cache for fast access and an undo stack for reverting changes.
Data Structure Designlru-cachetree-traversalcommand-patternundo-redo - 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 - 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 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 - 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