KatInterview

practice a little every day — you've got this ♡

Data Structure Design Interview Problems

Practice 5971 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.

5971
Problems
2211
Auto-graded
15
Topics
272
Added today

Showing 331–360 of 375 results

  • Data Structure DesignMediumAuto-graded
    Compute Credit Ledger with Expiration

    Implement an in-memory ledger that manages time-limited credits with priority expiration and debt tracking.

    Data Structure Designheappriority-queuesimulation
  • Data Structure DesignEasyAuto-graded
    Multi-User File System with Snapshots and Account Consolidation

    Build an in-memory file storage system with per-user quotas, global file uniqueness, ranked retrieval, account merging, and atomic snapshot restore.

    Data Structure Designhash-mapsimulationdata-structure-design
  • Data Structure DesignMediumAuto-graded
    Incremental Entropy Tracker for Categorical Streams

    Build a data structure that efficiently computes Shannon entropy after each new categorical observation arrives.

    Data Structure Designstreamingentropyincremental-computation
  • Data Structure DesignMediumAuto-graded
    Request Quota Tracker with Rolling Time Windows

    Tests your ability to track request counts per user within a sliding time window using efficient data structures.

    Data Structure Designsliding-windowqueuerate-limiting
  • Data Structure DesignMediumAuto-graded
    Build a Fixed-Size Cache That Forgets the Least-Used Entry

    Tests your ability to combine a hash map and an ordered structure to implement O(1) reads and writes with recency-based eviction.

    Data Structure Designhash-maplinked-listcachedesign
  • Data Structure DesignMediumAuto-graded
    Flatten and Filter a Nested Configuration Tree

    Tests the ability to write an iterator-style traversal over arbitrarily nested dicts and lists to extract leaf values matching a type filter.

    Data Structure Designdata structuresrecursioniteratorsnested data
  • Data Structure DesignMediumAuto-graded
    Simulate a Price-Level Tracker for Buy and Sell Orders

    Tests 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.

    Data Structure Designheaphash-maplazy-deletionsimulation
  • Data Structure DesignEasyAuto-graded
    Track User Votes with Deduplication

    Tests ability to maintain stateful vote tracking with idempotent operations and bounded history retrieval

    Data Structure Designhash-tablestate-managementdeduplication
  • Data Structure DesignHardAuto-graded
    Time-Versioned Key-Value Storage

    Implement a data structure that stores versioned values by timestamp and retrieves the most recent version at or before a query time.

    Data Structure Designbinary-searchhash-mapdata-structures
  • Data Structure DesignMediumAuto-graded
    Process Account Transaction Sequence

    Tests ability to implement stateful operations on indexed data with validation, edge-case handling, and multiple operation types.

    Data Structure Designsimulationvalidationstate-management
  • Data Structure DesignMediumAuto-graded
    Compute Dot Products for Memory-Efficient Integer Vectors

    Tests efficient sparse data representation using hash maps and optimizing operations by focusing on non-zero elements only.

    Data Structure Designhash-mapsparse-dataoptimization
  • Data Structure DesignHardAuto-graded
    Simulate a TTL-Aware LFU Cache with Frequency Snapshots

    Tests 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.

    Data Structure Designdata structurescachesimulation
  • Data Structure DesignMediumAuto-graded
    Build a Min-Heap Data Structure from Scratch

    Evaluates ability to implement a complete binary min-heap using array indexing, bubble-up, and bubble-down operations without library support.

    Data Structure Designheaps-sortingarraysdata-structures
  • Data Structure DesignEasyAuto-graded
    Gem Purchase Simulator with Color-Based Discounts

    Tests stateful simulation with resource tracking, discount accumulation, and transactional updates.

    Data Structure Designsimulationstate-managementhash-map
  • Data Structure DesignHardAuto-graded
    Track the Earliest Single-Occurrence Integer in a Stream

    Design a structure that efficiently identifies the first integer appearing exactly once in a dynamic sequence of integers.

    Data Structure Designqueuehash-tabledata-structure-design
  • Data Structure DesignMediumAuto-graded
    Multi-Component Data Processing Challenge

    Tests array merging from the back, queue-based task scheduling with time slices, and price-level order matching in a simulated trading book.

    Data Structure Designarraysqueuessimulation
  • Data Structure DesignMediumAuto-graded
    Task Assignment System with Expiration Windows

    Tests in-memory data modeling, time-based state management, priority queuing, and handling overlapping task assignments with TTL semantics.

    Data Structure Designobject-oriented-designtime-based-logicdata-structures
  • Data Structure DesignMediumAuto-graded
    Ring-Buffer Event Counter with Time Windows

    Tests 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.

    Data Structure Designsliding-windowring-bufferdata-structure-design
  • Data Structure DesignMediumAuto-graded
    Schema-Free Record Store with Column Indexing

    Tests ability to design an in-memory key-value store with flexible schemas, column-based retrieval, and multi-field filtering logic.

    Data Structure Designhash-tablesindexingdata-structures
  • Data Structure DesignMediumAuto-graded
    Reverse Trie for Ending Pattern Queries

    Tests understanding of tries and the insight that suffix matching becomes prefix matching when strings are reversed.

    Data Structure Designtriestring-matchingdata-structures
  • Data Structure DesignMediumAuto-graded
    In-Memory Store with Nested Transaction Support

    Tests your ability to implement layered state management with nested scopes, tombstone deletion tracking, and atomic commit/rollback semantics.

    Data Structure Designhash-tablestackstate-management
  • Data Structure DesignMediumAuto-graded
    Two-Stack Document Editor with Cursor Operations

    Tests efficient implementation of a mutable text buffer with insertion, deletion, and bidirectional cursor movement using dual-stack architecture.

    Data Structure Designstacksstring-manipulationsimulation
  • Data Structure DesignHardAuto-graded
    Build a Virtual Directory Tree with File Operations

    Design and implement a tree-based in-memory filesystem supporting directory creation, file I/O, listing, and deletion via absolute paths.

    Data Structure Designtreeshash-tablesdata-structure-designpath-traversal
  • Data Structure DesignMediumAuto-graded
    Crawling Worm Simulation: Track Length After Each Step

    Tests precise deque-plus-set simulation of a growing worm on a grid, including the exact ordering of tail removal and collision detection.

    Data Structure Designsimulationdequehash-set
  • Data Structure DesignMediumAuto-graded
    Query Engine for Content Moderation Event Logs

    Build an efficient query system over sorted violation records supporting policy lookups, post lookups, and time-based aggregations using indexing and binary search.

    Data Structure Designhash-mapbinary-searchindexing
  • Data Structure DesignEasyAuto-graded
    Count Requests Within a Sliding Time Window

    Tests ability to implement a sliding-window rate limiter by counting how many past requests fall within a fixed-duration window ending at each query timestamp.

    Data Structure Designdata structuressliding windowrate limiter
  • Data Structure DesignHardAuto-graded
    Streaming Median Query

    Tests balanced heap design to maintain dynamic order statistics with logarithmic insertions and constant-time median queries.

    Data Structure Designheapsdata-structuresstreamingmedian
  • Data Structure DesignMediumAuto-graded
    Billing Ledger with Credit Prioritization and Backdating

    Process billing events where credits pay usage before subscription fees, supporting out-of-order event insertion with selective recomputation.

    Data Structure Designdata-structuressimulationordered-data
  • Data Structure DesignMediumAuto-graded
    Time-Aware Key-Field Store with Expiration

    Tests ability to implement an in-memory store with nested key-field structure, lexicographic scanning, timestamps, and TTL-based expiration logic.

    Data Structure Designhash-mapsimulationtime-based-expiration
  • Data Structure DesignMediumAuto-graded
    Key-Value Store with Expiration and Snapshots

    Design a nested dictionary with field-level expiration times and the ability to capture and restore database snapshots.

    Data Structure Designhash-tablesimulationdata-structure-design