practice a little every day — you've got this ♡
Data Structure Design Interview Problems
Practice 5985 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.
- 5985
- Problems
- 2218
- Auto-graded
- 15
- Topics
- 271
- Added today
Showing 481–510 of 739 results
- Data Structure DesignMediumAuto-gradedScore Tracker with Ranking and Top-K Queries
Tests the ability to maintain ordered scores with efficient updates and rank lookups using augmented balanced search trees.
Data Structure Designbinary-search-treeorder-statisticsdata-structures - Data Structure DesignMediumAuto-gradedVersioned Key-Value Log with Point-in-Time Reads
Tests per-key version tracking and efficient predecessor search to retrieve the most recent value written at or before any queried timestamp.
Data Structure Designbinary searchhash mapversioning - Data Structure DesignHardModel answerMutable Integer Set with Freeze-Frame Iterators
Design an integer set supporting O(1) add/remove/contains plus snapshot iterators that capture insertion-order state at creation time without copying.
Data Structure Designsnapshotsiteratorsappend-only logversioning - Data Structure DesignMediumModel answerBuild a Path-Addressed Tree Store and a Bounded Ring Buffer
Design an in-memory hierarchical path store with strict parent-existence errors, plus a fixed-capacity FIFO queue where every operation is constant time.
Data Structure Designtriehash-mapcircular-bufferapi-design - Data Structure DesignMediumAuto-gradedAccess-Tracked Key-Value Store
Build a dictionary that counts how many times each key has been retrieved, testing hash map design and state management.
Data Structure Designhash-mapdesignsimulation - Data Structure DesignMediumModel answerIn-Memory Grid with Formula Evaluation and Cycle Guards
Build a spreadsheet class in three stages: plain integer cells, formula parsing with dependency-order evaluation, then cycle detection and targeted recomputation.
Data Structure Designgraphsdependency-trackingparsing - Data Structure DesignHardModel answerPeak Concurrent Couriers Over a Rolling 24-Hour Window
Design a data structure that records courier delivery intervals and efficiently answers: what is the highest number of couriers simultaneously active at any instant in the last 24 hours?
Data Structure Designsegment-treeintervalssliding-windowonline-algorithms - Data Structure DesignMediumAuto-gradedRound-Robin Load Balancer with Capacity and Shutdown
Tests stateful system simulation with round-robin target selection, connection lifecycle tracking, capacity enforcement, and target shutdown with eviction ordering.
Data Structure Designsimulationhash-tableround-robinstateful - Data Structure DesignMediumAuto-gradedDisjoint Set: Merge Nodes and Query Connectivity
Tests ability to implement Union-Find with union by rank and path compression, supporting merge, connectivity, and component-count queries.
Data Structure Designunion-finddisjoint-setgraphdata-structure-design - Data Structure DesignHardModel answerBuilding Map and Filter from a Reduce Foundation
Implement a reduce operation, then express map and filter purely in terms of that reducer without independent iteration.
Data Structure Designhigher-order-functionsfunctional-programmingdata-structures - Data Structure DesignHardAuto-gradedIP Access Control with CIDR Matching
Tests binary trie implementation for efficient IP prefix matching with CIDR notation and rule subsumption optimization.
Data Structure Designtriebit-manipulationnetwork-programming - Data Structure DesignMediumModel answerBuild a Dropping Tile Game with Win Detection
Implement game logic for a gravity-based two-player board game: handle piece placement, detect wins efficiently, and analyze complexity.
Data Structure Designgame-logic2d-gridstate-machine - Data Structure DesignMediumModel answerBuild a Type-Aware Key-Value Store from First Principles
Design a hash map that supports keys and values of arbitrary types, covering hashing contracts, equality semantics, collision resolution, and memory ownership.
Data Structure Designhash-maptype-erasurecollision-resolutionmemory-management - Data Structure DesignMediumModel answerGenerate Unique Character Profiles with Attribute Rules
Build a generator that creates N character profiles from trait pools, enforcing no-duplicates, uniqueness, and dependency rules between attributes.
Data Structure Designbacktrackingconstraint-satisfactionalgorithms - Data Structure DesignMediumAuto-gradedParcel Attribute Store with TTL and Prefix Queries
Simulate a timestamped key-value attribute store with overwrite, conditional update, sorted prefix listing, and per-attribute expiry.
Data Structure Designhash-mapsimulationsortingexpiry - Data Structure DesignMediumAuto-gradedReplayable Library Lending Operations
Simulate a book catalog with case-insensitive title/author search and atomic borrow/return state transitions replayed from an operation log.
Data Structure Designhash-mapsimulationstring-matchingstate-machine - Data Structure DesignHardAuto-gradedRolling-Window Chat Activity Tracker
Build a bounded-memory sliding-window aggregator answering distinct-chat, distinct-user, and message-total queries from an operation log in amortized O(1).
Data Structure Designsliding-windowdequehash-mapreference-counting - Data Structure DesignMediumAuto-gradedBilling Reconciliation: Match Payments to Invoices in Three Stages
Tests incremental lookup design by matching payments to invoices via explicit ID, then earliest-dated exact-amount fallback, then a forgiveness range, with closed-invoice tracking throughout.
Data Structure Designhash-mapheapsegment-tree - Data Structure DesignMediumModel answerBuild a Collapsible JSON Tree Renderer in React
Create a React component that parses a JSON string and displays it as an interactive, expandable tree structure.
Data Structure Designreactrecursioncomponent-designstate-management - Data Structure DesignEasyAuto-gradedBuild a Fixed-Capacity Recency-Ordered Cache
Tests whether you can design a cache that evicts the least-recently-touched entry in O(1) time using a hash map paired with an ordered structure.
Data Structure Designhash-maplinked-listcacheOrderedDict - Data Structure DesignMediumAuto-gradedUnified Entity Log with Mergeable ID Groups
Tests ability to design a data structure that resolves multiple system-assigned IDs to a single entity and returns a chronologically merged observation history.
Data Structure Designunion-finddesignsorting - Data Structure DesignMediumAuto-gradedTwo-Way Link Mapper: Shorten and Restore URLs
Tests ability to design a bidirectional hash map structure that assigns stable short identifiers to long URLs and retrieves originals in O(1).
Data Structure Designhash-mapdesignstrings - Data Structure DesignMediumModel answerBuild a Weighted Consistent Hash Ring
Design and code a hash ring that maps keys to servers with virtual nodes, supporting weighted capacity and minimal key movement on topology changes.
Data Structure Designhashingdistributed-systemsdata-structuresbinary-search - Data Structure DesignMediumModel answerDependency-Aware Job Scheduler with Priority Queues
Build an in-memory scheduler that tracks job prerequisites, selects the next runnable job by a four-field priority rule, supports filtered queries, and detects deadlocks.
Data Structure Designheaptopological-sortgraphsimulation - Data Structure DesignMediumModel answerContinuous-Batch Inference Loop with Slot Refilling
Implement a dynamic batching generation loop that keeps a fixed-size batch full by refilling completed slots from a waiting queue until all requests are served.
Data Structure Designbatchinginferencesimulationqueue - Data Structure DesignMediumModel answerModel a Prepaid Spending Account with Transaction Limits
Design a class hierarchy that tracks a spending cap, running balance, and transaction history while safely handling concurrent charges and edge-case inputs.
Data Structure Designobject-oriented designconcurrencystate managementPython - Data Structure DesignMediumModel answerFix a Broken Round-Robin Load Balancer
Debug and repair a round-robin router that mis-assigns requests when servers are added, removed, or marked unhealthy, then write tests covering the edge cases.
Data Structure Designround-robinload-balancingdebuggingconcurrency - Data Structure DesignMediumAuto-gradedSimulate a Bounded Cache That Forgets the Least-Used Entry
Tests O(1) design of a fixed-size recency-ordered cache: correct eviction order, recency refresh on reads and writes, and update-without-evict semantics.
Data Structure Designhash-maplinked-listcachedesign - Data Structure DesignMediumAuto-gradedOrder State Machine with Transition Validation
Tests finite state machine implementation with strict transition rules and rejection of invalid state changes.
Data Structure Designstate-machinevalidationdata-structures - Data Structure DesignMediumAuto-gradedVariable Registry With Deep Reference Expansion and Cycle Detection
Tests recursive variable substitution with memoization, cycle detection across direct and indirect references, and clean handling of undefined variable references.
Data Structure Designstringsrecursionhash-mapcycle-detection