practice a little every day — you've got this ♡
Data Structure Design Interview Problems
Practice 5978 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.
- 5978
- Problems
- 2214
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 571–600 of 738 results
- 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 DesignHardAuto-gradedN-Player High-Card Showdown: Simulate and Score
Tests object-style thinking, round-robin dealing, and deterministic simulation of a card game where each round's highest card wins all played cards.
Data Structure Designsimulationqueuesgame-design - 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 DesignHardAuto-gradedTTL-Aware LRU Cache with Lazy Expiration
Tests ability to design an O(1) key-value store combining LRU eviction with per-entry time-to-live expiration using a hash map and doubly linked list.
Data Structure Designlinked-listshash-mapcachelru - 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 - Data Structure DesignEasyAuto-gradedReplay an Operation Log to Answer Versioned Key Lookups
Tests the ability to simulate a versioned key-value store by replaying a sequence of set/delete operations and answering point-in-time key lookups.
Data Structure Designdata structuressimulationhash map - Data Structure DesignMediumAuto-gradedSimulate LRU Cache with Composite Keys
Tests understanding of LRU eviction policy, composite key normalization, and cache statistics tracking through command simulation.
Data Structure Designlru-cachehashingordered-dictdata-structures - 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 DesignMediumAuto-gradedCircular Buffer Deque with Auto-Resize
Tests ability to build a double-ended queue on a ring-indexed array that doubles in capacity when full, keeping all operations amortized O(1).
Data Structure Designdequecircular-arrayamortized-analysis - 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 DesignMediumAuto-gradedBuild a Time-Aware Key-Value Store with Expiration Logic
Tests data structure design, time-based expiration semantics, and clean handling of missing or stale entries in an in-memory cache.
Data Structure Designhash-tabletime-simulationexpirationcache-design - Data Structure DesignMediumAuto-gradedDigit Hand Showdown
Classify numeric hands by frequency patterns with custom ranking, then break ties using positional comparison without sorting.
Data Structure Designobject-oriented-designpattern-matchingextensibility - 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 DesignMediumAuto-gradedSession Key Manager with Deferred Cleanup
Tests building a session-key store with TTL-based lazy eviction using a hash map and min-heap to process a sequence of operations.
Data Structure Designheaphash-maplazy-deletionsimulation - Data Structure DesignMediumAuto-gradedFind Unreceived IDs in a Sequential Stream
Tests efficient gap tracking in a sequential ID space using sets and amortized range updates.
Data Structure Designsetrange-trackingamortized-analysis - 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 DesignMediumAuto-gradedBinary Layout Manager with Dynamic Field Insertion
Tests ability to maintain ordered sequences with efficient prefix-sum queries and positional insertions using balanced tree structures.
Data Structure Designbinary-search-treeprefix-sumdata-structure-design - 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 - 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 - 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 - 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 - 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 - 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 - 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