practice a little every day — you've got this ♡
Data Structure Design 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 151–180 of 737 results
- Data Structure DesignHardModel answerGreedy Longest-Match Subword Encoder Built on a Byte Trie
Design and implement a deterministic subword encoder that uses a trie for longest-match lookup, with lossless Unicode handling, versioned vocabularies, tests, and a comparison with BPE and WordPiece.
Data Structure Designtrietokenizerunicodenlp - Data Structure DesignMediumAuto-gradedLatest-Wins Priority Job Runner Simulation
Simulate a job runner where resubmitting an ID overrides its earlier entry, testing heap-based lazy deletion with tie-breaking and run-once rules.
Data Structure Designheaplazy-deletionsimulationhash-map - Data Structure DesignMediumModel answerStar Feedback Widget with Compose and a ViewModel
Build a Compose feedback form with a 1-5 star selector, a capped comment field and an async submit, driven by a single ViewModel state stream that survives rotation and double taps.
Data Structure Designkotlinjetpack-composeandroidmvvm - Data Structure DesignMediumModel answerReversible Edit History for a Formula-Driven Grid
Design a command-based history for a spreadsheet that undoes and redoes cell edits, row deletions and batches, recomputes dependent formulas, handles irreversible actions, and bounds memory.
Data Structure Designcommand-patternundo-redomementodependency-graph - Data Structure DesignMediumAuto-gradedMost Connected User Tracker with Variable Top-K Queries
Maintain distinct-contact counts for users from undirected messages, answer the top user in O(1), and return a top-k list with deterministic tie-breaking.
Data Structure Designhash-sethash-mapheapsimulation - Data Structure DesignHardModel answerHardening a Coalescing TTL Cache: Failures, Invalidation, Eviction
Review a promise-coalescing TTL cache in TypeScript, find its failure, invalidation and memory bugs, write a fixed version, and explain how to port it safely to multithreaded C++20.
Data Structure Designasynccacherace-conditionslru - Data Structure DesignEasyAuto-gradedIn-Memory Store with Transaction Layering
Implement an in-memory key-value database supporting GET, SET, DELETE, and nested transaction semantics (BEGIN, ROLLBACK, COMMIT).
Data Structure Designdesign-dsstacks-queuesarraysstrings - Data Structure DesignMediumAuto-gradedPath-Addressed Tree Store: Replay a Command Log
Simulate a path-keyed tree store by replaying a list of commands, testing trie or hash-map design, path validation, and exact failure semantics.
Data Structure Designdesigntriehash-mapsimulation - Data Structure DesignMediumModel answerBuild an In-Memory Price History Store with One-Shot Updates
Design a per-symbol price store supporting lookups, custom change formulas, atomic range updates that can touch each slot only once, and a switch from daily to hourly data.
Data Structure Designdata-structure-designtime-seriesatomic-updateshash-map - Data Structure DesignHardAuto-gradedBest-Fit Block Allocator with Coalescing and Log-Time Operations
Simulate a best-fit extent allocator over a huge block range, where reserve and release must merge adjacent free runs and run in logarithmic time.
Data Structure Designdesignordered-settreapcoalescing - Data Structure DesignMediumAuto-gradedBatch Simulation of Conflict-Free Node Locks on a Rooted Tree
Process a batch of lock, unlock and query operations on a rooted tree where no locked node may be an ancestor or descendant of another, using subtree ranges and Fenwick trees.
Data Structure Designtreeeuler-tourfenwick-treedesign - Data Structure DesignMediumAuto-gradedSimulate a Multi-User File Store with Quotas and Compression
Simulate a command-driven in-memory file store with ownership, per-user quotas, prefix/suffix search, quota-driven eviction and size-changing renames.
Data Structure Designdesignhash-mapsimulationsorting - Data Structure DesignMediumModel answerBinary Wire Format for a Nested Key-Value Map
Design and implement a versioned, checksummed binary format that converts a nested key-value map to bytes and back, and compare it with JSON and MessagePack.
Data Structure Designserializationbinary-formatchecksumversioning - Data Structure DesignHardModel answerDesign an In-Memory Sentence Search Index
Design a data structure that supports adding, removing, and efficiently querying sentences by keyword in real time.
Data Structure DesignData Structure DesignInverted IndexStringHash Table - Data Structure DesignMediumAuto-gradedReplay Requests Through a Per-Key Throttle
Simulate a per-key sliding-window throttle over a batch of timed requests, tracking only accepted requests and handling window-boundary expiry correctly.
Data Structure Designsliding-windowdequehash-mapsimulation - Data Structure DesignMediumAuto-gradedSimulate Snapshot Set Operations and Iterators
Simulate mutation and snapshot iteration on a persistent set structure using interval-based logical timestamps.
Data Structure Designdesign-dsarraysdata-structures - Data Structure DesignMediumModel answerReal-Time Log Event Aggregation in React
Design and build a React component that ingests a real-time event stream, aggregates stats per category, handles out-of-order timestamps, and throttles re-renders for high throughput.
Data Structure Designreactdata-structuresstreamingperformance - Data Structure DesignEasyAuto-gradedDesign a Deduplicated Storage System
Simulate file system operations while maintaining deduplicated content storage using reference counting.
Data Structure Designdesign-dsarraysstrings - Data Structure DesignEasyModel answerRecency-Evicting Store and Random Gift-Swap Pairing
Two short coding tasks: build a fixed-size store that drops the least recently touched key in constant time, and pair up participants from a CSV so nobody draws themselves.
Data Structure Designlru-cachehash-mapdoubly-linked-listderangement - Data Structure DesignEasyModel answerShow How to Use a Move-Only Heap Buffer in C++, and Defend It
Read a move-only C++ class that owns a heap array, write a clean example program that uses it correctly, and explain the ownership, move, noexcept, explicit and const rules behind it.
Data Structure Designcppraiimove-semanticsrule-of-five - Data Structure DesignMediumAuto-gradedRun-of-K Grid Game Simulator for Many Players
Simulate an N x N, M-player connect-K game with turn order, move validation, win detection from the last move, board snapshots and undo.
Data Structure Designsimulationgriddesignundo - Data Structure DesignMediumAuto-gradedRoster Coverage and Rating Leaderboard Simulator
Simulate a command log against a stateful tracker that merges per-agent time intervals and ranks agents by average rating with alphabetical tie-breaking.
Data Structure Designdesignintervalshash-mapsorting - Data Structure DesignMediumAuto-gradedBatch-Driven Slash-Path Registry with Leaf-Only Deletion
Simulate a tree-shaped registry addressed by slash-separated paths, processing a batch of create, set, get and remove commands and returning one result per command.
Data Structure Designtriehash-mapdesignstring-parsing - Data Structure DesignHardModel answerDesign an In-Memory Recipe Storage Engine
Design and implement an in-memory storage manager supporting CRUD operations, custom identifier parsing, case-insensitive uniqueness, and controlled renames.
Data Structure Designdesign-dsarraysstrings - Data Structure DesignMediumAuto-gradedAppend-Only Editor with Undo and Redo Replay
Simulate a tail-only text buffer with undo and redo histories, recording only edits that change the text and clearing redo on every new edit.
Data Structure Designdesignstacksimulationundo-redo - Data Structure DesignHardModel answerReframing Chunked Async Reads into Length-Prefixed Frames
Turn an async sequence of arbitrarily split byte chunks into complete frames, each preceded by a 4-byte big-endian length, while handling truncation and oversized lengths.
Data Structure Designstreamingstate-machineasyncbinary-parsing - Data Structure DesignMediumModel answerConcurrent Micro-Batching Writer with Backpressure and Timed Flush
Build a thread-safe buffer that accepts records from many producers and writes them to a database in batches, triggered by size, age of the oldest record, or shutdown, without holding locks during I/O.
Data Structure Designconcurrencycondition-variablesbackpressurebatching - Data Structure DesignMediumModel answerBuild a Shutdown-Aware Producer/Consumer Queue in C++
Design a generic, thread-safe C++ queue where consumers block when it is empty and a shutdown call releases every waiting thread once the remaining items are drained.
Data Structure Designcppconcurrencymutexcondition-variable - Data Structure DesignMediumModel answerExpiring Store, Reversible Actions, and Org Chart Walk
Three short design-and-code tasks: a key-value store with per-entry lifetimes and background pruning, an action history with undo/redo, and a depth-first walk over a hierarchy.
Data Structure Designcachettlmin-heapundo-redo - Data Structure DesignMediumModel answerPhoto Slideshow with Ranked Comment Threads and Safe Voting
Design a slideshow widget plus per-photo comment threads with idempotent voting and fast top-k ranking, scaling to 10^5 photos and 10^6 comments.
Data Structure Designdata-structure-designsorted-indexidempotencypagination