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 661–690 of 737 results

  • Data Structure DesignHardModel answer
    Build a Function Pipeline and JSON Serialization Mixin

    Create a left-to-right function compositor and a mixin class that serializes object attributes to JSON with configurable privacy filtering.

    Data Structure Designpythonclosuresmetaprogrammingserialization
  • Data Structure DesignEasyModel answer
    Build an Inventory Manager with Nested Recipe Expansion

    Implement a service that models recipes with nested dependencies, validates acyclic graphs, and atomically decrements raw inventory when orders succeed.

    Data Structure Designobject-oriented-designgraph-validationatomicityconcurrency
  • 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 DesignMediumModel answer
    Build a Social Payment Platform with Friend Connections

    Implement an in-memory system that handles user registration, friendship management, and peer-to-peer money transfers with proper validation.

    Data Structure Designobject-oriented-designhash-tablesstate-management
  • Data Structure DesignMediumModel answer
    Build a Tic-Tac-Toe Game Engine with Move Validation

    Design and implement a class that tracks board state, validates moves, detects winners, and enforces turn-based gameplay for a 3×3 grid game.

    Data Structure Designstate-machinegame-logicobject-oriented-design
  • 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 DesignMediumModel answer
    Scored Catalog Rotator: Ordered Traversal with Live Updates

    Design an in-memory playlist that always serves the highest-scored unseen item per round, supports live score changes, and is safe for concurrent callers.

    Data Structure Designheaptreemapconcurrencydata-structure-design
  • 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 DesignMediumModel answer
    Restaurant Query and Order Analytics System

    Design data structures and algorithms to query restaurants by price and distance, then compute order statistics and rankings over time windows.

    Data Structure Designdata-structuresalgorithmstime-seriesheap
  • Data Structure DesignMediumModel answer
    Build an In-Memory Meal Catalog with Search and Updates

    Create a service that stores meal records with auto-incrementing IDs, normalized fields, atomic modifications, and filtered search with multiple sort orders.

    Data Structure Designdata-structuresstate-managementindexingnormalization
  • Data Structure DesignMediumModel answer
    Credit System with Expiration and Time-Ordered Replay

    Build a credit tracking system where allocations expire, spending prioritizes earliest expiration, and operations arrive out of chronological order.

    Data Structure Designheaptime-orderingdata-structure-design
  • Data Structure DesignMediumModel answer
    Design a Fixed-Heap Memory Manager

    Build malloc and free over a fixed byte array, comparing allocation strategies and analyzing fragmentation trade-offs.

    Data Structure Designmemory-managementdata-structurescomplexity-analysis
  • Data Structure DesignMediumModel answer
    Build a Rule-Based Board Game State Manager

    Design an immutable, thread-safe game engine with pluggable validation rules for a turn-based strategy game.

    Data Structure Designobject-oriented-designimmutabilitystrategy-patternconcurrency
  • 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 DesignMediumModel answer
    Binary Protocol for String Dictionary Persistence

    Build a binary encoder and decoder for string dictionaries with strict validation of format integrity, size bounds, and key ordering.

    Data Structure Designserializationbinary-protocolsvalidationdata-structures
  • Data Structure DesignMediumModel answer
    Build Directory Tree Operations with Path Parsing

    Implement directory creation and listing for an in-memory hierarchical structure with automatic parent creation and path normalization.

    Data Structure Designtreetriepath-parsingstring-manipulation
  • 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 DesignMediumModel answer
    Ad Targeting Engine and Route Optimization

    Build an ad matcher with inverted indexes and a delivery router using shortest-path precomputation plus TSP heuristics.

    Data Structure Designindexinggraphsoptimizationtrade-offs
  • Data Structure DesignMediumModel answer
    Build a Thread-Safe In-Memory Cache with TTL Expiry

    Design and implement a concurrent key-value store that supports optional per-entry expiration, lazy eviction, and background memory reclamation.

    Data Structure Designconcurrencyttlheapeviction
  • Data Structure DesignMediumModel answer
    Design a Fluent Query Builder with Chaining and Join Support

    Build a Python query builder that chains table, select, where, alias, and join methods, rendering to SQL strings that match an exact expected format.

    Data Structure Designapi-designfluent-interfacesql-generation
  • Data Structure DesignMediumModel answer
    Rate Limiter with Continuous Drainage Pattern

    Build a request throttler that drains at a fixed rate, accepting requests only when space exists, first single-threaded then thread-safe.

    Data Structure Designrate-limitingconcurrencytime-based-statetesting
  • 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 DesignMediumModel answer
    Sparse Matrix Implementation with Operations

    Build a memory-efficient representation for sparse matrices and implement addition, multiplication, and display operations.

    Data Structure Designsparse-matrixdictionarymatrix-operations