KatInterview

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

Data Structure Design Interview Problems

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

5987
Problems
2219
Auto-graded
15
Topics
270
Added today

Showing 421–450 of 739 results

  • Data Structure DesignMediumAuto-graded
    Quota-Based Storage Service Simulator with Snapshots

    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.

    Data Structure Designdesignhash-mapsimulationsorting
  • Data Structure DesignMediumAuto-graded
    Snapshot-based key-value store with checkpoint and reload

    Simulate a key-value store that serializes its full contents on checkpoint and replaces live state on reload, testing state management and round-trip serialization.

    Data Structure Designdesignserializationkey-value storestate management
  • Data Structure DesignMediumAuto-graded
    LRU Cache Simulator with Recency and Grouped Views

    Simulates an LRU cache through a sequence of put, get, and snapshot operations, testing recency bookkeeping, eviction, and ordered grouping of values.

    Data Structure DesignLRU cacheOrderedDicthash mapsimulation
  • Data Structure DesignMediumAuto-graded
    Batch Simulation of an Expiring LRU Key-Value Store

    Replay a batch of timestamped get and set operations against a fixed-capacity store that combines per-key expiry with least-recently-used eviction.

    Data Structure Designhash maplinked listLRU cachesimulation
  • Data Structure DesignMediumModel answer
    Build a Task Registry and Content-Based Duplicate Finder

    Design an in-memory task manager with per-user quotas, priority ordering and audit trails, then detect duplicate files using size filtering and streaming hashes.

    Data Structure Designhash-mapssorted-containersfilesystemhashing
  • Data Structure DesignMediumModel answer
    Build a Configurable Disc-Drop Game Engine

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

    Data Structure Designgame-engineapi-design2d-arraywin-detection
  • Data Structure DesignMediumModel answer
    Build a Slash-Command Router with Literal and Wildcard Segments

    Implement a trie-based router that matches tokenized bot commands to registered handlers, resolving conflicts between exact and parameterized path segments.

    Data Structure Designtrieroutingdesignstring-parsing
  • Data Structure DesignMediumAuto-graded
    Train Line Fare System with Dynamic Routes and Weekend Pricing

    Tests object-oriented design, index lookups, dynamic data structure updates, and conditional pricing rules in a fare calculation system.

    Data Structure Designobject-oriented-designhash-mapsimulation
  • Data Structure DesignMediumAuto-graded
    Tiered Cache with TTL and Priority Fallback

    Implement a hierarchical key-value cache with expiration times, priority-based lookups, and lazy eviction across multiple storage tiers.

    Data Structure Designhash-tableheapdata-structure-design
  • Data Structure DesignMediumModel answer
    Build a POS cart with live receipt printing and combo deals

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

    Data Structure Designdata-structuressimulationgreedy
  • Data Structure DesignMediumModel answer
    Rolling-Window Key-Value Store with Live Average

    Design a key-value store that expires entries older than a configurable time window and supports O(1) average-case get, put, and average queries.

    Data Structure Designhash-maplinked-listsliding-windowamortized-analysis
  • Data Structure DesignHardModel answer
    Thread-Safe Queue with Lease-Based Message Visibility

    Design an in-memory queue that delivers messages with time-limited leases, validates acknowledgments against current lease tokens, and rejects duplicate entries.

    Data Structure Designconcurrencyqueuestate-machineidempotency
  • Data Structure DesignMediumModel answer
    Classic Data-Structure Drills: Cache, Trie, Heaps, Graphs

    Work through fifteen core algorithm patterns—LRU cache, trie, two-pointers, sliding window, topological sort, and more—naming invariants before coding.

    Data Structure Designhash-tablestwo-pointerssliding-windowgraphs
  • Data Structure DesignHardAuto-graded
    Policy-Driven Spending Report Checker

    Tests whether a candidate can implement a multi-scope rule evaluation pipeline that collects all violations across item-level, aggregate, and relational policy checks.

    Data Structure Designobject-oriented designopen-closed principledata aggregation
  • Data Structure DesignMediumModel answer
    Building an In-Memory Recipe Store with Search and Versioning

    Design an in-memory recipe system with CRUD, ingredient lookup, per-user attribution with sorting, and immutable version history that survives deletes.

    Data Structure Designobject-oriented-designin-memory-storeindexingaudit-history
  • Data Structure DesignHardModel answer
    In-Memory Ledger with Timed Transfers and Account Consolidation

    Design an in-memory financial ledger supporting deposits, transfers, scheduled future payments, top-K spending rankings, and account merges with pending-payment reconciliation.

    Data Structure Designheaphash-mapschedulingunion-find
  • Data Structure DesignMediumModel answer
    Design an In-Memory Ledger with Transfers and Activity Ranking

    Build an in-memory account ledger in stages—create/deposit, transfer, top-N by activity—plus a command-string test harness with clear failure semantics.

    Data Structure Designobject-oriented-designhash-mapheaptest-harness
  • Data Structure DesignMediumModel answer
    Build a Flexible Validation Engine with Pluggable Rules

    Design a payroll validator that lets you plug in new checks without changing the core engine, using abstraction and priority-based execution.

    Data Structure Designobject-oriented-designdesign-patternsextensibility
  • Data Structure DesignMediumAuto-graded
    Maintain Dynamic Multiset with Rank Queries

    Tests the ability to build a structure that handles insertions and k-th largest queries efficiently using a Fenwick tree over the value domain.

    Data Structure Designfenwick-treebinary-indexed-treerank-queriesmultiset
  • Data Structure DesignMediumAuto-graded
    Simulate a Least Recently Used Cache with Fixed Capacity

    Tests understanding of LRU eviction policy through hash map and doubly-linked list composition to achieve O(1) operations.

    Data Structure Designhash-maplinked-listcachelru
  • Data Structure DesignMediumModel answer
    Bits, Cache Eviction, and Vertex Degrees: Fundamentals Under Pressure

    Explain two's-complement shifts, compare LRU vs LFU eviction with trade-offs, and derive in-degree query costs across graph representations.

    Data Structure Designbit-manipulationcachinggraphscomplexity
  • Data Structure DesignMediumModel answer
    Build a Bank, Validate Passwords, and Evaluate Expressions

    Design a mini banking system, write a password strength checker with generator, and parse arithmetic expressions with full operator precedence.

    Data Structure Designhash-mapstackparsingsimulation
  • Data Structure DesignMediumModel answer
    Concurrent Queue with Bounded Capacity and Graceful Shutdown

    Implement a thread-safe FIFO queue with fixed capacity, blocking operations, timeout support, and coordinated shutdown behavior.

    Data Structure Designconcurrencythreadingsynchronizationmonitor-pattern
  • Data Structure DesignHardAuto-graded
    Type-Safe Storage with Lifetime Tracking

    Tests understanding of object lifetime management, type tracking, and exception safety in a discriminated union implementation.

    Data Structure Designobject-lifetimetype-safetyexception-handling
  • Data Structure DesignMediumModel answer
    One-Edit Word Lookup and Vertical Tree Traversal

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

    Data Structure Designhashingtriebinary-treebfs
  • Data Structure DesignHardAuto-graded
    Versioned Membership Tracker with Point-in-Time Queries

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

    Data Structure Designbinary searchdesignhash map
  • Data Structure DesignMediumAuto-graded
    Sliding Window Request Rate Calculator

    Tests the ability to implement time-bucketed sliding-window aggregation with efficient memory usage and amortized constant-time operations.

    Data Structure Designsliding-windowtime-seriesdata-structuresamortized-analysis
  • Data Structure DesignHardModel answer
    Live Spreadsheet with Eager Caching and Cycle Guards

    Build a spreadsheet engine where every write pre-computes all downstream values so reads are O(1) cache lookups, and circular definitions are rejected atomically.

    Data Structure Designgraphstopological-sortcycle-detectiondependency-tracking
  • Data Structure DesignMediumAuto-graded
    Sliding Window Event Log with Time-Based Expiration

    Design a data structure that tracks timestamped events and supports queries over a moving time window with automatic expiration of old entries.

    Data Structure Designsliding-windowqueuestime-seriesdata-structures
  • Data Structure DesignMediumModel answer
    Build an In-Memory Key-Value Store with Savepoints

    Design a transactional key-value store supporting nested transactions, named savepoints, and full rollback using an undo-log approach.

    Data Structure Designtransactionsundo-logkey-value-storenested-transactions