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 661–690 of 737 results
Create a left-to-right function compositor and a mixin class that serializes object attributes to JSON with configurable privacy filtering.
Model answerpythonclosuresmetaprogrammingserializationImplement a service that models recipes with nested dependencies, validates acyclic graphs, and atomically decrements raw inventory when orders succeed.
Model answerobject-oriented-designgraph-validationatomicityconcurrencyEvaluates ability to implement a complete binary min-heap using array indexing, bubble-up, and bubble-down operations without library support.
Auto-gradedheaps-sortingarraysdata-structuresImplement an in-memory system that handles user registration, friendship management, and peer-to-peer money transfers with proper validation.
Model answerobject-oriented-designhash-tablesstate-managementDesign and implement a class that tracks board state, validates moves, detects winners, and enforces turn-based gameplay for a 3×3 grid game.
Model answerstate-machinegame-logicobject-oriented-designTests stateful simulation with resource tracking, discount accumulation, and transactional updates.
Auto-gradedsimulationstate-managementhash-mapDesign an in-memory playlist that always serves the highest-scored unseen item per round, supports live score changes, and is safe for concurrent callers.
Model answerheaptreemapconcurrencydata-structure-designDesign a structure that efficiently identifies the first integer appearing exactly once in a dynamic sequence of integers.
Auto-gradedqueuehash-tabledata-structure-designTests array merging from the back, queue-based task scheduling with time slices, and price-level order matching in a simulated trading book.
Auto-gradedarraysqueuessimulationTests in-memory data modeling, time-based state management, priority queuing, and handling overlapping task assignments with TTL semantics.
Auto-gradedobject-oriented-designtime-based-logicdata-structuresTests whether a candidate can implement a fixed-memory sliding-window counter using a circular array of timestamped buckets with O(1) writes and O(W) reads.
Auto-gradedsliding-windowring-bufferdata-structure-designTests ability to design an in-memory key-value store with flexible schemas, column-based retrieval, and multi-field filtering logic.
Auto-gradedhash-tablesindexingdata-structuresDesign data structures and algorithms to query restaurants by price and distance, then compute order statistics and rankings over time windows.
Model answerdata-structuresalgorithmstime-seriesheapCreate a service that stores meal records with auto-incrementing IDs, normalized fields, atomic modifications, and filtered search with multiple sort orders.
Model answerdata-structuresstate-managementindexingnormalizationBuild a credit tracking system where allocations expire, spending prioritizes earliest expiration, and operations arrive out of chronological order.
Model answerheaptime-orderingdata-structure-designBuild malloc and free over a fixed byte array, comparing allocation strategies and analyzing fragmentation trade-offs.
Model answermemory-managementdata-structurescomplexity-analysisDesign an immutable, thread-safe game engine with pluggable validation rules for a turn-based strategy game.
Model answerobject-oriented-designimmutabilitystrategy-patternconcurrencyTests understanding of tries and the insight that suffix matching becomes prefix matching when strings are reversed.
Auto-gradedtriestring-matchingdata-structuresTests your ability to implement layered state management with nested scopes, tombstone deletion tracking, and atomic commit/rollback semantics.
Auto-gradedhash-tablestackstate-managementTests efficient implementation of a mutable text buffer with insertion, deletion, and bidirectional cursor movement using dual-stack architecture.
Auto-gradedstacksstring-manipulationsimulationBuild a binary encoder and decoder for string dictionaries with strict validation of format integrity, size bounds, and key ordering.
Model answerserializationbinary-protocolsvalidationdata-structuresImplement directory creation and listing for an in-memory hierarchical structure with automatic parent creation and path normalization.
Model answertreetriepath-parsingstring-manipulationDesign and implement a tree-based in-memory filesystem supporting directory creation, file I/O, listing, and deletion via absolute paths.
Auto-gradedtreeshash-tablesdata-structure-designpath-traversalTests precise deque-plus-set simulation of a growing worm on a grid, including the exact ordering of tail removal and collision detection.
Auto-gradedsimulationdequehash-setBuild an ad matcher with inverted indexes and a delivery router using shortest-path precomputation plus TSP heuristics.
Model answerindexinggraphsoptimizationtrade-offsDesign and implement a concurrent key-value store that supports optional per-entry expiration, lazy eviction, and background memory reclamation.
Model answerconcurrencyttlheapevictionBuild a Python query builder that chains table, select, where, alias, and join methods, rendering to SQL strings that match an exact expected format.
Model answerapi-designfluent-interfacesql-generationBuild a request throttler that drains at a fixed rate, accepting requests only when space exists, first single-threaded then thread-safe.
Model answerrate-limitingconcurrencytime-based-statetestingBuild an efficient query system over sorted violation records supporting policy lookups, post lookups, and time-based aggregations using indexing and binary search.
Auto-gradedhash-mapbinary-searchindexingBuild a memory-efficient representation for sparse matrices and implement addition, multiplication, and display operations.
Model answersparse-matrixdictionarymatrix-operations