KatInterview

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

Data Structure Design Interview Problems

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

5967
Problems
2210
Auto-graded
15
Topics
272
Added today

Showing 721–737 of 737 results

  • Data Structure DesignMediumModel answer
    Terminal Naval Combat: Fleet Setup and Attack System

    Implement a console-based naval battle game where two players configure their fleets through text input, then exchange fire until one side is eliminated.

    Data Structure Designobject-oriented-designinput-validationstate-management
  • Data Structure DesignMediumAuto-graded
    Transaction Fraud Pipeline with Behavioral Rules

    Build a stateful stream processor that validates payment records, detects velocity and spending anomalies, and produces fixed-width audit logs.

    Data Structure Designsimulationparsingsliding-window
  • Data Structure DesignHardAuto-graded
    Banking Ledger with Time-Based Transfers and Account Consolidation

    Build an in-memory banking system that processes timed fund transfers deterministically and consolidates accounts with automatic transaction rerouting.

    Data Structure Designunion-findsimulationsorting
  • Data Structure DesignMediumModel answer
    Word Matcher and File System Implementation

    Build a function to find whole-word keyword matches in text, then design an in-memory file system with directory and file operations.

    Data Structure Designstring-processingdata-structurestreedesign
  • Data Structure DesignHardModel answer
    Arrays vs Hash Maps: Trade-offs for Sparse Active-Record Stores

    Compare arrays and hash maps across time complexity, memory, and cache behavior, then choose the right structure for a sparse integer-keyed active set.

    Data Structure Designhash-maparraymemorycache
  • Data Structure DesignMediumModel answer
    Concurrent Cache with Deduplication and Safe Expiry

    Implement thread-safe cache retrieval that deduplicates simultaneous requests for identical keys while maintaining parallelism across distinct keys.

    Data Structure Designconcurrencycachingsynchronization
  • Data Structure DesignMediumModel answer
    Frontend State Management and Form Handling

    Build a web interface that manages list state, handles form submission with proper error recovery, integrates with APIs, and maintains data consistency.

    Data Structure Designfrontendstate-managementform-validationapi-integration
  • Data Structure DesignMediumAuto-graded
    Flip Isolated O Regions to X Using Union-Find

    Implement a union-find solution to identify and capture O regions that don't reach the board's edges, testing disjoint-set design and 2D-to-1D index mapping.

    Data Structure Designunion-finddisjoint-setgridconnectivity
  • Data Structure DesignMediumAuto-graded
    Aggregate Scores Across a Sponsorship Tree

    Tests tree traversal and subtree aggregation by computing cumulative scores bottom-up across a forest of sponsor-recruit relationships.

    Data Structure Designtrees-graphsdesign-dsstacks-queues
  • Data Structure DesignMediumAuto-graded
    Sliding-Window Rate Limiter Over Event Timestamps

    Tests the ability to implement a sliding-window rate limiter that, given a log of request timestamps, determines which requests are allowed under a fixed-window capacity.

    Data Structure Designdata structuresrate limitersliding window
  • Data Structure DesignHardAuto-graded
    Stateful Activity Window Aggregation Over an Event Stream

    Tests whether a candidate can maintain per-user rolling time windows over a chronologically ordered stream and emit aggregated records incrementally without buffering the whole input.

    Data Structure Designhash-mapsimulationstreamingaggregation
  • Data Structure DesignMediumAuto-graded
    Simulate a Frequency-Eviction Cache (LFU Cache)

    Tests ability to simulate a Least-Frequently-Used cache by processing a sequence of get/put operations and returning the complete history of return values.

    Data Structure Designdata structurescachesimulationhash map
  • Data Structure DesignEasyAuto-graded
    Flatten and Iterate a Nested Registry

    Tests the ability to implement a depth-first iterator over arbitrarily nested lists and dicts that yields leaf values in traversal order.

    Data Structure Designdata structuresiterationrecursion
  • Data Structure DesignEasyAuto-graded
    Sliding Window API Rate Limiter

    Tests ability to implement a sliding-window rate limiter that counts requests within a fixed-width time window using a list of timestamps.

    Data Structure Designrate limitersliding windowdata structures
  • Data Structure DesignMediumAuto-graded
    Simulate a TTL-Aware LRU Cache with Operation Log

    Tests ability to simulate a fixed-capacity LRU cache where entries expire after a per-entry TTL, processing a sequence of GET/PUT/DELETE operations.

    Data Structure Designdata structurescachesimulation
  • Data Structure DesignMediumAuto-graded
    Reconstruct Versioned Key-Value Store from Operation Log

    Tests the ability to replay a sequential log of set/delete operations on a key-value store and answer point-in-time value queries efficiently.

    Data Structure Designdata structuressimulationversioned storehash map
  • Data Structure DesignEasyAuto-graded
    Simulate a Bounded LRU Cache with Hit/Miss Tracking

    Tests ability to simulate a sequence of GET/PUT operations on a capacity-bounded LRU cache and return accumulated hit/miss statistics.

    Data Structure Designdata structuressimulationcache