KatInterview

Topic

Data Structure Design interview problems

Caches, iterators, rate limiters and custom containers. 737 original problems, each with hidden test cases you can run in the browser.

Problems737

53 easy587 medium97 hard

Showing 691–720 of 737 results

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

    Auto-gradeddata structuressliding windowrate limiter
  • Create a filterable transaction list that automatically highlights entries with the highest amount among currently visible results.

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

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

    Model answerrule-enginepolicy-evaluationsystem-designdata-structures
  • Build a JavaScript controller for frame-by-frame playback with play, pause, seek, and configurable FPS, handling timer accuracy and state management.

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

    Model answerdata-structurestrieundo-redogap-buffer
  • Tests balanced heap design to maintain dynamic order statistics with logarithmic insertions and constant-time median queries.

    Auto-gradedheapsdata-structuresstreamingmedian
  • Build a concurrent task executor that honors dependencies, enforces worker limits, and propagates failures through dependent jobs.

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

    Model answerfrequency-countingheapssliding-windowstreaming-algorithms
  • Process billing events where credits pay usage before subscription fees, supporting out-of-order event insertion with selective recomputation.

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

    Model answerobject-oriented-designtime-intervalsmoney-arithmeticstate-management
  • Tests ability to implement an in-memory store with nested key-field structure, lexicographic scanning, timestamps, and TTL-based expiration logic.

    Auto-gradedhash-mapsimulationtime-based-expiration
  • Design and implement the query-handling layer for an autocomplete component with debouncing, retry logic, response ordering, and result caching.

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

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

    Model answerc++data-structuresperformancememory
  • Build a thread-safe banking system supporting account creation, deposits, and transfers with atomic balance updates.

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

    Model answeriteratorsinterface-designlazy-evaluation
  • Reproduce and fix a bug causing incorrect driver-to-order matching in a delivery assignment service.

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

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

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

    Model answerstate-machinereservation-systemunion-findexpiry-handling
  • Build a system that tracks balloon altitudes, computes spatially-varying wind exposure from multiple sources, and identifies stable balloons above a threshold.

    Model answerevent-simulationspatial-aggregationtime-based-statedata-structures
  • Tests ability to build a stateful key-value store that resolves integer expressions with named references, propagates updates through a dependency graph, and rejects cycles.

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

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

    Model answerheapsevent-orderingtime-seriesdata-structures
  • Build a system that maintains liquidity across trading venues and efficiently queries best prices per venue and across all venues.

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

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

    Model answerconcurrencymemory-managementcompilersdata-structures
  • Design and implement an access decision engine that evaluates ordered security rules with conditions expressed in a custom expression language.

    Model answerparsinginterpretersrecursioncompiler-design
  • Tests event stream processing with time-based lookback windows, requiring efficient per-user state management and timestamp-based expiration logic.

    Auto-gradedqueueshash-mapstime-windows

More topics