Topic
Data Structure Design interview problems
Caches, iterators, rate limiters and custom containers. 739 original problems, each with hidden test cases you can run in the browser.
53 easy589 medium97 hard
Showing 421–450 of 739 results
Simulate a command stream on a storage service with per-user quotas, ownership transfer, prefix-based top-n listing, and per-user snapshot and restore.
Auto-gradeddesignhash-mapsimulationsortingSimulate a key-value store that serializes its full contents on checkpoint and replaces live state on reload, testing state management and round-trip serialization.
Auto-gradeddesignserializationkey-value storestate managementSimulates an LRU cache through a sequence of put, get, and snapshot operations, testing recency bookkeeping, eviction, and ordered grouping of values.
Auto-gradedLRU cacheOrderedDicthash mapsimulationReplay a batch of timestamped get and set operations against a fixed-capacity store that combines per-key expiry with least-recently-used eviction.
Auto-gradedhash maplinked listLRU cachesimulationDesign an in-memory task manager with per-user quotas, priority ordering and audit trails, then detect duplicate files using size filtering and streaming hashes.
Model answerhash-mapssorted-containersfilesystemhashingDesign and implement a gravity-based four-in-a-row game engine with a clean API, local win detection, and support for arbitrary board sizes and run lengths.
Model answergame-engineapi-design2d-arraywin-detectionImplement a trie-based router that matches tokenized bot commands to registered handlers, resolving conflicts between exact and parameterized path segments.
Model answertrieroutingdesignstring-parsingTests object-oriented design, index lookups, dynamic data structure updates, and conditional pricing rules in a fare calculation system.
Auto-gradedobject-oriented-designhash-mapsimulationImplement a hierarchical key-value cache with expiration times, priority-based lookups, and lazy eviction across multiple storage tiers.
Auto-gradedhash-tableheapdata-structure-designDesign a point-of-sale cart that prints an itemized receipt on every tap and then extends to apply non-overlapping combo discounts after each update.
Model answerdata-structuressimulationgreedyDesign a key-value store that expires entries older than a configurable time window and supports O(1) average-case get, put, and average queries.
Model answerhash-maplinked-listsliding-windowamortized-analysisDesign an in-memory queue that delivers messages with time-limited leases, validates acknowledgments against current lease tokens, and rejects duplicate entries.
Model answerconcurrencyqueuestate-machineidempotencyWork through fifteen core algorithm patterns—LRU cache, trie, two-pointers, sliding window, topological sort, and more—naming invariants before coding.
Model answerhash-tablestwo-pointerssliding-windowgraphsTests whether a candidate can implement a multi-scope rule evaluation pipeline that collects all violations across item-level, aggregate, and relational policy checks.
Auto-gradedobject-oriented designopen-closed principledata aggregationDesign an in-memory recipe system with CRUD, ingredient lookup, per-user attribution with sorting, and immutable version history that survives deletes.
Model answerobject-oriented-designin-memory-storeindexingaudit-historyDesign an in-memory financial ledger supporting deposits, transfers, scheduled future payments, top-K spending rankings, and account merges with pending-payment reconciliation.
Model answerheaphash-mapschedulingunion-findBuild an in-memory account ledger in stages—create/deposit, transfer, top-N by activity—plus a command-string test harness with clear failure semantics.
Model answerobject-oriented-designhash-mapheaptest-harnessDesign a payroll validator that lets you plug in new checks without changing the core engine, using abstraction and priority-based execution.
Model answerobject-oriented-designdesign-patternsextensibilityTests the ability to build a structure that handles insertions and k-th largest queries efficiently using a Fenwick tree over the value domain.
Auto-gradedfenwick-treebinary-indexed-treerank-queriesmultisetTests understanding of LRU eviction policy through hash map and doubly-linked list composition to achieve O(1) operations.
Auto-gradedhash-maplinked-listcachelruExplain two's-complement shifts, compare LRU vs LFU eviction with trade-offs, and derive in-degree query costs across graph representations.
Model answerbit-manipulationcachinggraphscomplexityDesign a mini banking system, write a password strength checker with generator, and parse arithmetic expressions with full operator precedence.
Model answerhash-mapstackparsingsimulationImplement a thread-safe FIFO queue with fixed capacity, blocking operations, timeout support, and coordinated shutdown behavior.
Model answerconcurrencythreadingsynchronizationmonitor-patternTests understanding of object lifetime management, type tracking, and exception safety in a discriminated union implementation.
Auto-gradedobject-lifetimetype-safetyexception-handlingDesign a data structure for single-character substitution queries, then output a binary tree's node values sorted by column, row, and left-to-right order.
Model answerhashingtriebinary-treebfsTests ability to design a copy-on-write set that records per-element change history and answers historical membership queries in O(log n) via binary search.
Auto-gradedbinary searchdesignhash mapTests the ability to implement time-bucketed sliding-window aggregation with efficient memory usage and amortized constant-time operations.
Auto-gradedsliding-windowtime-seriesdata-structuresamortized-analysisBuild a spreadsheet engine where every write pre-computes all downstream values so reads are O(1) cache lookups, and circular definitions are rejected atomically.
Model answergraphstopological-sortcycle-detectiondependency-trackingDesign a data structure that tracks timestamped events and supports queries over a moving time window with automatic expiration of old entries.
Auto-gradedsliding-windowqueuestime-seriesdata-structuresDesign a transactional key-value store supporting nested transactions, named savepoints, and full rollback using an undo-log approach.
Model answertransactionsundo-logkey-value-storenested-transactions