KatInterview

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

Data Structure Design Interview Problems

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

5969
Problems
2211
Auto-graded
15
Topics
272
Added today

Showing 331–360 of 362 results

  • 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 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
  • Data Structure DesignMediumModel answer
    Real-Time List Filter with Dynamic Maximum Highlighting

    Create a filterable transaction list that automatically highlights entries with the highest amount among currently visible results.

    Data Structure Designfrontendstate-managementfilteringui-components
  • Data Structure DesignMediumModel answer
    Contiguous Range Manager with Dynamic Resizing

    Build a system to manage named, non-overlapping contiguous ranges over a fixed ID space with dynamic resizing that minimally shifts neighbors.

    Data Structure Designrange-managementgreedyarraysystem-design
  • Data Structure DesignMediumModel answer
    Transaction Policy Engine Design and Implementation

    Build a configurable rule engine that evaluates financial transactions against spending policies and returns approval decisions in real-time.

    Data Structure Designrule-enginepolicy-evaluationsystem-designdata-structures
  • Data Structure DesignMediumModel answer
    Frame-Based Media Player in JavaScript

    Build a JavaScript controller for frame-by-frame playback with play, pause, seek, and configurable FPS, handling timer accuracy and state management.

    Data Structure Designjavascripttimersclosuresapi-design
  • Data Structure DesignMediumModel answer
    Text Editor with Undo and Word Suggestions

    Build a text editor class supporting character insertion, deletion, cursor movement, undo/redo operations, and prefix-based word autocompletion.

    Data Structure Designdata-structurestrieundo-redogap-buffer
  • Data Structure DesignMediumModel answer
    Parallel Job Scheduler with Dependency Management

    Build a concurrent task executor that honors dependencies, enforces worker limits, and propagates failures through dependent jobs.

    Data Structure Designconcurrencygraphstopological-sort
  • Data Structure DesignMediumModel answer
    Frequency Tracking with Static and Streaming Top-K Retrieval

    Build data structures to identify the most frequent elements in three scenarios: a fixed array, an unbounded stream, and a time-windowed stream.

    Data Structure Designfrequency-countingheapssliding-windowstreaming-algorithms
  • Data Structure DesignMediumModel answer
    In-Memory Payroll Tracker with Partial Settlement

    Build an object-oriented service to log driver work intervals, compute wages, and process payments while preventing double-pay and handling overlaps.

    Data Structure Designobject-oriented-designtime-intervalsmoney-arithmeticstate-management
  • Data Structure DesignMediumModel answer
    Building Robust Autocomplete Query Management

    Design and implement the query-handling layer for an autocomplete component with debouncing, retry logic, response ordering, and result caching.

    Data Structure Designasynccachingstate-management
  • Data Structure DesignMediumModel answer
    Concurrent In-Memory Cache with Sharded Locking

    Build a thread-safe in-memory cache supporting concurrent reads and writes, choosing data structures and synchronization primitives to minimize contention.

    Data Structure Designconcurrencythreadinglockingdata-structures
  • Data Structure DesignMediumModel answer
    C++ Implementation Details: Containers and Polymorphism

    Explain the internal mechanics of std::vector growth, std::unordered_map collision handling, and virtual function dispatch in C++.

    Data Structure Designc++data-structuresperformancememory
  • Data Structure DesignMediumModel answer
    Banking API with Thread-Safe Account Operations

    Build a thread-safe banking system supporting account creation, deposits, and transfers with atomic balance updates.

    Data Structure Designconcurrencythreadinglocksdata-structures
  • Data Structure DesignMediumModel answer
    Build Iterator Abstractions and Composed Traversals

    Design an iterator protocol from scratch, implement concrete iterators with different traversal logic, and extend them with features like peeking, filtering, and flattening.

    Data Structure Designiteratorsinterface-designlazy-evaluation
  • Data Structure DesignMediumModel answer
    Fix a Ride Dispatch Selection Bug

    Reproduce and fix a bug causing incorrect driver-to-order matching in a delivery assignment service.

    Data Structure Designdebuggingtestingconcurrencydistributed-systems
  • Data Structure DesignMediumModel answer
    Build a Concurrent Batch Transform Engine with Error Isolation

    Create a worker-pool-based processor that applies transformation pipelines to 2D integer grids, ensuring failures in individual items don't affect others.

    Data Structure Designconcurrencyerror-handlingthreading
  • Data Structure DesignMediumModel answer
    Account Ledger with Reservation Expiry and Merging

    Design a banking ledger that supports deposits, time-limited transfer reservations, acceptance of reserved transfers, and merging accounts with their pending operations.

    Data Structure Designstate-machinereservation-systemunion-findexpiry-handling
  • Data Structure DesignMediumModel answer
    Wind Field Tracker for Hot Air Balloons

    Build a system that tracks balloon altitudes, computes spatially-varying wind exposure from multiple sources, and identifies stable balloons above a threshold.

    Data Structure Designevent-simulationspatial-aggregationtime-based-statedata-structures
  • Data Structure DesignMediumModel answer
    Build a Dynamic IP Address Filter with CIDR and Range Support

    Implement a low-latency IP rule matcher supporting CIDR blocks and numeric ranges with conflict resolution based on specificity and recency.

    Data Structure Designnetworkingdata-structuresheapsalgorithms
  • Data Structure DesignMediumModel answer
    Time-Ordered Credit Bucket Manager

    Build a ledger tracking credit buckets with expiration windows, supporting out-of-order events, priority-based consumption, and point-in-time balance queries.

    Data Structure Designheapsevent-orderingtime-seriesdata-structures
  • Data Structure DesignMediumModel answer
    Managing a Live Event Stream with Pause and Statistics

    Build a React hook that processes a high-speed event stream with deduplication, sorting, memory limits, pause/resume, and rolling time-window metrics.

    Data Structure Designreacthooksstate-managementstreaming
  • Data Structure DesignMediumModel answer
    RPN Calculator and Lock-Free Queue Implementation

    Build a macro-enabled expression evaluator and implement a thread-safe ring buffer with proper memory ordering.

    Data Structure Designconcurrencymemory-managementcompilersdata-structures
  • Data Structure DesignMediumModel answer
    Build a Rule-Based Access Control Evaluator with Expression Parsing

    Design and implement an access decision engine that evaluates ordered security rules with conditions expressed in a custom expression language.

    Data Structure Designparsinginterpretersrecursioncompiler-design
  • 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 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