practice a little every day — you've got this ♡
Data Structure Design Interview Problems
Practice 5986 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.
- 5986
- Problems
- 2219
- Auto-graded
- 15
- Topics
- 271
- Added today
Showing 451–480 of 739 results
- Data Structure DesignMediumAuto-gradedAggregate Sales Data with Running and Grand Totals
Tests dictionary aggregation, deterministic ordering, and building cumulative totals along two dimensions from grouped records.
Data Structure Designaggregationdictionariesdata-processing - Data Structure DesignMediumModel answerBuild a FIFO Queue: Compare Linked List, Array, and Ring Buffer
Implement a queue with enqueue, dequeue, peek, and isEmpty. Compare linked list, dynamic array, and circular buffer approaches.
Data Structure Designqueuedata-structurescomplexity-analysismemory-management - Data Structure DesignMediumAuto-gradedSimulated Word Store with Prefix Query
Tests trie-style prefix counting logic via operation replay, with optional case-insensitive and trailing-digit normalization flags.
Data Structure Designtriestringssimulation - Data Structure DesignHardAuto-gradedRunning Median Over a Live Integer Feed
Tests whether a candidate can design a two-heap structure that inserts integers and queries the running median in better than O(N) time per operation.
Data Structure Designheapsdesignstreaming - Data Structure DesignMediumAuto-gradedMini Query Engine: Filter, Sort, and Project Rows
Tests ability to implement a pipeline of filter, multi-column sort, and column projection over a list of in-memory row dicts.
Data Structure Designdata structuressortingfiltering - Data Structure DesignMediumModel answerBuild a Thread-Safe Token Bucket Rate Limiter
Implement a token bucket that refills lazily on each admission attempt, handles concurrent callers safely, and supports both non-blocking and timeout-bounded acquisition.
Data Structure Designconcurrencyrate-limitingsynchronization - Data Structure DesignMediumAuto-gradedBounded Cache with Least-Recently-Used Eviction
Simulate a capacity-limited key–value cache where lookups and writes both refresh recency and the oldest entry is evicted on overflow.
Data Structure Designhash-maplinked-listcachesimulation - Data Structure DesignMediumModel answerConcurrent Data Structures and Calendar Scheduling
Build thread-safe request throttling, search from scratch, frequency-ranked retrieval, and multi-calendar availability finder.
Data Structure Designconcurrencydata-structuresalgorithmsscheduling - Data Structure DesignMediumModel answerBuild a Multi-Key Task Queue with Ordering and Concurrency Control
Create a thread-safe task scheduler that runs tasks sequentially per key while respecting a global worker limit and capacity bound.
Data Structure Designconcurrencythreadingqueuesynchronization - Data Structure DesignMediumAuto-gradedBatch Spreadsheet Cell Evaluator with Cycle Rejection
Simulate setting and reading spreadsheet cells whose values are integers or sums of references, evaluating lazily and rejecting updates that would form cycles.
Data Structure Designgraphscycle-detectionexpression-evaluationdependency-tracking - Data Structure DesignMediumModel answerMultiset with O(1) Insert, Delete, and Uniform Random Sampling
Build a collection supporting duplicates with constant-time insertion, deletion, and uniform random selection from all stored occurrences.
Data Structure Designdata-structureshash-tablesrandomization - Data Structure DesignMediumModel answerTwo-Tier API Rate Limiter with a Sliding Window
Design a thread-safe rate limiter that enforces both a per-endpoint quota and a shared global quota using a rolling time window.
Data Structure Designrate-limitingconcurrencysliding-windowthread-safety - Data Structure DesignMediumModel answerBuild a Reference-Counted Shared Ownership Pointer in C++
Implement a thread-safe shared ownership smart pointer class template from scratch, covering copy/move semantics, atomic reference counting, and correct destruction.
Data Structure Designc++memory-managementconcurrency - Data Structure DesignMediumAuto-gradedFreelance Crew Pay Tracker With Rolling Settlements
Tests the ability to design an in-memory ledger class driven by an operation list, maintaining running cost totals and an idempotent pay-cutoff pointer.
Data Structure Designdesignsimulationhash-map - Data Structure DesignMediumAuto-gradedVersioned Key-Value Store with Global Version Tracking
Implement a key-value store where each write increments a global version counter and reads retrieve values by version using binary search.
Data Structure Designbinary-searchdata-structuresversioning - Data Structure DesignMediumModel answerDynamic Hierarchy Manager with Timestamp Ordering
Build a system that processes timestamped parent-child updates arriving in any order, maintains a valid tree structure, and prevents cycles.
Data Structure Designtreesgraphsstate-managementcycle-detection - Data Structure DesignMediumModel answerDesign a Five-Card Hand Evaluator with Partial Hand Completion
Model poker-style five-card hands with an abstract type hierarchy, compare two hands by strength and tie-break, then find the strongest and weakest completions of a partial hand.
Data Structure Designobject-oriented designclassificationcombinatoricscomplexity analysis - Data Structure DesignMediumModel answerConcurrent Task Execution with Type-Level Exclusion
Build a synchronization mechanism allowing tasks of the same type to run together while blocking tasks of different types from overlapping.
Data Structure Designconcurrencythreadingsynchronization - Data Structure DesignMediumAuto-gradedSimulate a Linked List with Iterator and Transform
Tests ability to implement a doubly-linked list supporting sequential iteration and non-mutating element-wise transformation via a command-driven simulation.
Data Structure Designlinked-listiterator-patternhigher-order-functions - Data Structure DesignMediumModel answerDefensive Coding: Validate and Harden a Snake Game
Design an input-validation strategy, error-handling policy, and test suite to protect a Snake game implementation from every class of bad input.
Data Structure Designvalidationerror-handlingtestingsnake-game - Data Structure DesignMediumAuto-gradedFixed-Capacity Eviction Cache with Recency Tracking
Tests whether you can design a cache that evicts the least recently accessed entry in O(1) time by combining a hash map with an ordered structure.
Data Structure Designhash-maplinked-listdesigncache - Data Structure DesignHardModel answerBuild a Subscription Pattern Recognition Engine
Create a system that discovers recurring billing patterns in transaction data, handling merchant name variations, timing drift, and price changes.
Data Structure Designpattern-recognitiondata-processingheuristics - Data Structure DesignMediumModel answerBuild an In-Memory Promo Code Service
Design and implement a class that creates, validates, and redeems promotional discount codes with expiry, global and per-user limits, and idempotent retries.
Data Structure Designhash-mapexpirationidempotencyconcurrency - Data Structure DesignMediumModel answerDesign a Multiset Trie with Fast Prefix Counting
Build a trie that tracks word multiplicities, supports insertion, deletion, exact and prefix lookup, and handles Unicode safely.
Data Structure Designtriedata-structuresconcurrencyunicode - Data Structure DesignMediumAuto-gradedBoard Game: Detect k-in-a-Row on a Rectangular Grid
Tests incremental win detection on an m×n board by tracking consecutive run lengths at endpoints to check for k-in-a-row in O(1) per move.
Data Structure Designdesignarrayssimulation - Data Structure DesignMediumModel answerBuild a Nested-Transaction Key–Value Store from Scratch
Design and implement an in-memory key–value store that supports arbitrarily nested BEGIN/COMMIT/ROLLBACK transactions with correct shadowing and O(1) reads.
Data Structure Designhash-mapstacktransactionsundo-log - Data Structure DesignMediumModel answerBuild a Stack That Also Tracks and Removes the Maximum
Design a stack supporting push, pop, top, peekMax, and popMax, with two implementations trading off simplicity against O(log n) worst-case popMax.
Data Structure Designstackheaplinked-listamortized-complexity - Data Structure DesignHardModel answerVersioned In-Memory Set with Snapshot Iterators and WAL Contracts
Design an MVCC-backed mutable set with O(1) snapshot iterators and specify the durability, ordering, and crash-recovery contracts for a write-ahead log.
Data Structure DesignMVCCsnapshot isolationWALdata structure design - Data Structure DesignMediumAuto-gradedFilter Stream Events by Registered Patterns
Tests inverted index design and set-based matching to efficiently find which registered word patterns are satisfied by incoming events.
Data Structure Designhash-tablessetsinverted-index - Data Structure DesignMediumAuto-gradedFrequency-Based Cache Eviction
Build a cache that tracks access counts and evicts the least-used item, breaking ties by recency, all in constant time.
Data Structure Designhash-mapdoubly-linked-listcachedesign