Topic
Data Structure Design interview problems
Caches, iterators, rate limiters and custom containers. 737 original problems, each with hidden test cases you can run in the browser.
53 easy587 medium97 hard
Showing 631–660 of 737 results
Tests implementation of a bounded FIFO queue using circular array indexing with constant-time operations.
Auto-gradedqueuecircular-bufferarraydata-structure-designTests state tracking and rule validation for alternating player moves on a bounded one-dimensional board.
Auto-gradedsimulationstate-machinevalidationBuild a rule-based IP filter supporting CIDR blocks, priority resolution, and efficient queries for single IPs and prefix ranges.
Model answertrienetworkingbit-manipulationImplement an in-memory ledger that manages time-limited credits with priority expiration and debt tracking.
Auto-gradedheappriority-queuesimulationBuild a key-value store supporting nested transactions with set, get, delete, begin, commit, and rollback operations.
Model answertransactionsstackstate-managementkey-value-storeBuild an in-memory file storage system with per-user quotas, global file uniqueness, ranked retrieval, account merging, and atomic snapshot restore.
Auto-gradedhash-mapsimulationdata-structure-designBuild a data structure that efficiently computes Shannon entropy after each new categorical observation arrives.
Auto-gradedstreamingentropyincremental-computationTests your ability to track request counts per user within a sliding time window using efficient data structures.
Auto-gradedsliding-windowqueuerate-limitingDesign data structures to efficiently detect sequences of identical elements in an array and answer queries about their presence in suffixes.
Model answerarray-scanningpreprocessingrange-queriesTests your ability to combine a hash map and an ordered structure to implement O(1) reads and writes with recency-based eviction.
Auto-gradedhash-maplinked-listcachedesignCreate a rule evaluation system that checks expense submissions against JSON-defined policies without deploying new code.
Model answerdata-structuresparsingvalidationAnalyze time and space complexity for standard data structures and explain when to use each based on access patterns and constraints.
Model answerdata-structurescomplexity-analysistrade-offsImplement missing methods in concrete subclasses that inherit from abstract base classes while maintaining type safety and LSP compliance.
Model answerobject-oriented-designinheritanceabstractiondesign-patternsTests the ability to write an iterator-style traversal over arbitrarily nested dicts and lists to extract leaf values matching a type filter.
Auto-gradeddata structuresrecursioniteratorsnested dataTests your ability to combine a hash map with a lazy-deletion heap to track best bid and ask prices across a sequence of order book operations.
Auto-gradedheaphash-maplazy-deletionsimulationCreate a scoring system for a single tennis game that records points, displays readable scores, detects game completion, and supports multiple rule variants.
Model answerobject-oriented-designstrategy-patternstate-managementBuild a data structure supporting O(1) add, remove, and uniform random selection where duplicate entries are treated as separate items.
Model answerhash-tablearrayrandomizationduplicatesDesign and implement an object-oriented model for a nested task manager with status propagation, recursive deletion, and attribute-based filtering.
Model answerobject-oriented designtree traversalAPI designcomposite patternReview a structure storing items under contiguous integer keys with O(1) random selection and removal while preserving index density.
Model answercode-reviewdata-structuresrandomizationcomplexity-analysisSimulate a threshold-based card selection strategy that accounts for a shrinking deck, tracking which cards remain available after each decision.
Model answerfenwick-treegreedysimulationbinary-indexed-treeTests ability to maintain stateful vote tracking with idempotent operations and bounded history retrieval
Auto-gradedhash-tablestate-managementdeduplicationDesign a class for uniform random point sampling inside a square, then extend it to sample uniformly from the union of N non-overlapping squares.
Model answerprobabilityprefix-sumssamplinggeometryCreate an in-memory account manager that enforces balance rules, prevents duplicate processing via transaction IDs, and detects conflicting retries.
Model answerfinancial-systemsidempotencydata-structuresstate-managementImplement a data structure that stores versioned values by timestamp and retrieves the most recent version at or before a query time.
Auto-gradedbinary-searchhash-mapdata-structuresTests ability to implement stateful operations on indexed data with validation, edge-case handling, and multiple operation types.
Auto-gradedsimulationvalidationstate-managementBuild a concurrent object pool in C++ that safely manages reusable resources with blocking acquisition, automatic return via RAII, and graceful shutdown.
Model answerconcurrencyc++raiithread-safetyTests efficient sparse data representation using hash maps and optimizing operations by focusing on non-zero elements only.
Auto-gradedhash-mapsparse-dataoptimizationBuild a stateful manager that allows exactly one active two-party call at a time, with proper validation and error handling.
Model answerstate-machineobject-oriented-designvalidationexceptionsTests ability to simulate a multi-operation Least-Frequently-Used cache that evicts expired entries by TTL and breaks ties by recency, while supporting frequency-snapshot queries.
Auto-gradeddata structurescachesimulationWrite a service class that computes fees based on business rules, then extend it and write unit tests covering normal cases, boundaries, and errors.
Model answertestingvalidationobject-oriented-design