practice a little every day — you've got this ♡
Data Structure Design Interview Problems
Practice 5981 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.
- 5981
- Problems
- 2215
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 511–540 of 738 results
- Data Structure DesignMediumModel answerLibrary Loan Alert Engine: Holds, Checkouts, and Due Reminders
Design a notification manager for a book lending system that handles hold queues, checkout allocation, and idempotent due-date alerts.
Data Structure Designheapsimulationidempotencyqueue - Data Structure DesignMediumModel answerExtensible Card Hand Evaluator with Pluggable Rules
Design and incrementally build a card-hand evaluator that ranks hands, resolves ties deterministically, adds new categories, and applies a swappable discard rule.
Data Structure Designobject-oriented designextensibilitygame logic - Data Structure DesignMediumModel answerFile Storage Manager with Quota Enforcement
Build an in-memory file manager that tracks user storage, enforces capacity limits, and evicts largest files when quotas shrink.
Data Structure Designhash-mapheaplazy-deletionquota-management - Data Structure DesignMediumModel answerSliding-Window Trending URLs with Deduplication
Design a data structure that tracks the most-visited URLs over a configurable recent time window, with idempotent inserts and efficient eviction.
Data Structure Designsliding-windowheaphash-mapstreaming - Data Structure DesignMediumAuto-gradedOut-of-Order Loan Event Ledger with Fee-First Payments
Tests ordered insertion, fee-before-principal payment allocation, and efficient forward-propagation of balance changes when events arrive out of sequence.
Data Structure Designsimulationsorted-insertdata-structure-design - Data Structure DesignHardAuto-gradedIn-Memory Row Store with Filter, Sort, and Projection
Tests ability to build a stateful table abstraction that processes insert and query operations with filtering, sorting, and column projection.
Data Structure Designdesignsimulationsorting - Data Structure DesignMediumModel answerRandom Draw from a Mutable Membership Set in O(1)
Build a container that registers and removes integer keys and returns a uniformly random current key, all in average constant time.
Data Structure Designhash-maparrayrandomizedconstant-time - Data Structure DesignMediumAuto-gradedSimulate a Fixed-Capacity Recency-Eviction Cache
Tests whether you can combine a hash map and ordered structure to implement O(1) get/put with least-recently-used eviction on a bounded cache.
Data Structure Designhash-maplinked-listcachedesign - Data Structure DesignMediumAuto-gradedIn-Memory Spreadsheet with Formula Evaluation and Cycle Detection
Build a spreadsheet system that stores values, evaluates formulas referencing other cells, and prevents circular dependencies through pre-write validation.
Data Structure Designgraphdependency-trackingcycle-detection - Data Structure DesignMediumModel answerFile Storage with Quotas, Copy, and Compression
Build an in-memory file system tracking per-user storage limits, supporting file operations including duplication, compression, and quota-driven eviction.
Data Structure Designhash-mapheapobject-oriented-designbookkeeping - Data Structure DesignHardAuto-gradedExact-Phrase Lookup Across a Document Collection
Tests building a positional inverted index so that multi-word phrases can be found by exact word sequence across many documents with repeated queries handled efficiently.
Data Structure Designinverted-indexstring-searchhashing - Data Structure DesignMediumModel answerBuild a Bounded In-Memory File System with Auto-Rename
Design a trie-backed file system supporting path-based file insertion and directory listing, with a per-directory capacity cap and OS-style duplicate renaming.
Data Structure Designtriehash-mapfile-systemOOP - Data Structure DesignMediumModel answerBuild an Expiry-Aware LRU Cache Without Scanning Every Key
Design an in-memory cache that enforces capacity with LRU eviction and per-entry TTL, keeping expiration efficient without iterating all keys.
Data Structure Designcachelruttlconcurrency - Data Structure DesignMediumModel answerOrder Book Simulator with Fair Volume Participation
Build a limit order matching engine, then add participation-rate execution logic for one client, and finally extend to multiple clients with fair allocation.
Data Structure Designorder-bookpriority-queuesimulationgreedy - Data Structure DesignMediumAuto-gradedHash-Tree Diff: Detect File Changes Between Two Snapshots
Tests ability to build a bottom-up Merkle hash tree from file path/content mappings and use subtree hash pruning to efficiently classify added, modified, and deleted files.
Data Structure Designhashingtrees-graphsrecursion - Data Structure DesignMediumModel answerPath Template Router with Variables and Wildcard Tails
Build a trie-based URL router that registers templates with named captures and wildcard tails, resolves concrete paths with literal-first precedence and backtracking, and detects shape conflicts.
Data Structure Designtrieroutingbacktrackingdesign - Data Structure DesignMediumAuto-gradedSimulate a Fixed-Capacity Circular Queue
Tests ability to implement a circular buffer with O(1) enqueue/dequeue/peek and correct wraparound, full/empty handling, and ordered iteration.
Data Structure Designcircular-bufferqueuearraysimulation - Data Structure DesignMediumModel answerCompany Hierarchy Query System with Dynamic Updates
Build a data structure to efficiently query employee roles and reporting counts in a company hierarchy, then extend it to handle dynamic additions.
Data Structure Designtreesgraphspreprocessingaggregation - Data Structure DesignHardModel answerGreedy Text Tokenizer with Vocabulary Trie
Build a tokenizer that greedily matches the longest vocabulary token at each position, handling unknown characters with optional span merging.
Data Structure Designtriestring-matchingtokenizationgreedy-algorithms - Data Structure DesignMediumAuto-gradedRound-Robin Task Distribution with Dynamic Server Availability
Tests stateful simulation with circular iteration, capacity tracking, and toggling availability flags.
Data Structure Designsimulationcircular-iterationstate-management - Data Structure DesignMediumAuto-gradedReplay Operations Against an LRU Cache
Replay a scripted sequence of get/put operations against a fixed-capacity LRU cache and return one result per operation.
Data Structure Designlru-cachehash-mapsimulationordered-dict - Data Structure DesignMediumModel answerDuplicate-Aware Collection with O(1) Random Sampling
Design a multiset supporting insert, remove, and uniform random sampling over all occurrences, each in expected O(1) time.
Data Structure Designhash-maparrayrandomnessdata-structure-design - Data Structure DesignHardAuto-gradedBuild a Record Filter with Nested Query Conditions
Evaluate structured filter expressions with comparison, membership, and logical operators over in-memory records
Data Structure Designrecursiondata-structuresquery-evaluation - Data Structure DesignEasyAuto-gradedFind Minimum Index Gap Between Word Pairs
Tests the ability to preprocess data for efficient repeated lookups using hash maps and two-pointer merging of sorted lists.
Data Structure Designhash-maptwo-pointerspreprocessing - Data Structure DesignEasyModel answerTwo-Part Challenge: Token Frequencies and Multiset Overlap with a Barebones RDD
Using only flatMap, groupByKey, union, and collect on a minimal RDD class, implement word counting and a duplicate-preserving intersection of two datasets.
Data Structure Designrddword-countmultiset-intersection - Data Structure DesignMediumAuto-gradedDeduplicate Repeated Log Messages with Time Window
Filter a time-ordered stream of log messages to show each distinct message only once per 10-second window
Data Structure Designhash-mapstreamingrate-limiting - Data Structure DesignMediumAuto-gradedSimulate an In-Memory Key-Value Store
Tests ability to implement a command-driven key-value store with correct upsert, lookup, conditional update, delete, and membership semantics.
Data Structure Designhash-tablesimulationdesign - Data Structure DesignMediumModel answerBuild an Edit History System with Batching
Implement a command history mechanism supporting single edits, grouped operations, and bidirectional traversal through past states.
Data Structure Designundo-redocommand-patternstate-management - Data Structure DesignMediumModel answerBuild a Scoped Owner and a Resizable Container from Scratch
Implement a move-only smart pointer and a generic dynamic array in C++, exercising RAII, the Rule of Five, placement new, and exception-safe resizing.
Data Structure Designc++memory-managementraiimove-semantics - Data Structure DesignHardModel answerBuilding a Live Text Editor: Buffer, History, and Suggestions
Design and implement a text editor with insert/delete operations, undo/redo history, prefix-based autocomplete with frequency ranking, and multi-user concurrent editing.
Data Structure Designdata-structuresundo-redotrieoperational-transformation