KatInterview

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

Interview Practice Problems

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

5995
Problems
2220
Auto-graded
15
Topics
270
Added today

Showing 1771–1800 of 2220 results

  • Trees & GraphsHardAuto-graded
    Virus Spread Simulation with Recovery and Infection Thresholds

    Models discrete-time epidemic propagation on a grid where cells require multiple infected neighbors to catch the virus and recover after a fixed duration.

    Trees & Graphssimulationbfsgraph-traversal
  • Greedy & IntervalsMediumAuto-graded
    Venue Hours Checker with Overnight and Multi-Window Schedules

    Tests whether a venue is open at a given weekday and time, handling multiple daily windows, overnight shifts, and week-boundary wraparound.

    Greedy & Intervalsintervalssimulationboundary-conditions
  • Data Structure DesignEasyAuto-graded
    Sliding Window Hit Counter

    Tests ability to design time-windowed event counters with efficient memory management and query performance using sliding-window techniques.

    Data Structure Designqueuesliding-windowdata-structure-design
  • Heaps, Sorting & SearchMediumAuto-graded
    Binary Search Over a Row-Chained Sorted Grid

    Tests whether a candidate can exploit strict row-chaining in a sorted matrix to locate a target value in O(log(m·n)) time using a single binary search.

    Heaps, Sorting & Searchbinary-searcharraysmatrix
  • SQL & DataMediumAuto-graded
    Top Destination by Clear-Day Frequency

    Tests grouping, filtering categorical records, and correctly handling ties when aggregating a frequency count across multiple keys.

    SQL & Dataaggregationgroupingfilteringdictionaries
  • Trees & GraphsMediumAuto-graded
    Count Connected Land Regions in a Binary Grid

    Tests iterative 2D graph traversal to count connected components of land cells without modifying the input or risking recursion stack overflow.

    Trees & Graphsgraph traversalBFS/DFSconnected componentsgrid
  • Dynamic ProgrammingMediumAuto-graded
    Split-or-Enumerate Symbol Sequence Decoder

    Tests string parsing, memoized backtracking, and combinatorial enumeration by decoding a symbol-encoded message with either explicit or missing letter boundaries.

    Dynamic Programmingstringsdynamic-programmingbacktracking
  • Arrays & HashingMediumAuto-graded
    Repair a Looping Script by Swapping One Instruction

    Tests simulation, cycle detection, and brute-force search by finding the single jmp/nop swap that lets a small virtual machine terminate cleanly.

    Arrays & Hashingsimulationcycle-detectionbrute-force
  • Data Structure DesignHardAuto-graded
    Multi-Consumer Iterator with Shared Buffering

    Tests iterator protocols, lazy evaluation, and memory-efficient buffering for multiple independent consumers reading from a single source stream.

    Data Structure Designiteratorsgeneratorsmemory-management
  • Data Structure DesignMediumAuto-graded
    Batch Counter Updates with Global Shift and Min Extraction

    Tests lazy global offset propagation and min-heap with lazy deletion to efficiently manage counters under bulk increments and minimum extraction.

    Data Structure Designheaplazy-propagationdesign
  • Arrays & HashingEasyAuto-graded
    Classify Temperatures into Three Weather Bands

    Tests careful boundary handling by bucketing integer temperatures into cold, mild, and hot ranges and returning the three counts in order.

    Arrays & Hashingarrayscountingboundary conditions
  • SQL & DataMediumAuto-graded
    Rolling-Window Post Engagement: Reach, Length Percentiles, Self-Replies

    Tests SQL/Python analytics skills: filtering soft-deleted records, distinct-count aggregation, linear-interpolation percentiles, time-windowed grouping, and tie-breaking sort logic.

    SQL & Datasqlaggregationpercentiles
  • Arrays & HashingMediumAuto-graded
    Rectangular Stamp Overlap Counter

    Tests whether a candidate can use a 2D difference array to efficiently count how many rectangular regions overlap each cell of a grid.

    Arrays & Hashing2d-arrayprefix-sumdifference-array
  • Math & Bit ManipulationMediumAuto-graded
    Calculate Day Count Between Two Dates

    Tests understanding of calendar arithmetic including leap year logic, month lengths, and converting dates to a numeric representation.

    Math & Bit Manipulationmathimplementationdate-arithmetic
  • Arrays & HashingEasyAuto-graded
    Find Days Available to All Participants

    Tests set intersection logic and handling of multiple collections to find common elements across all inputs.

    Arrays & Hashingsetsintersectionarrays
  • Data Structure DesignMediumAuto-graded
    Running Median Tracker with Dual-Heap Design

    Tests the ability to maintain an efficient two-heap structure that yields the current median of a growing integer stream in O(log n) per insertion and O(1) per query.

    Data Structure Designheaptwo-heapsdata-streammedian
  • Trees & GraphsHardAuto-graded
    Detect File Changes Using Content-Based Tree Hashing

    Tests hierarchical hashing, tree traversal, and efficient change detection across nested directory structures

    Trees & Graphshashingtree-traversaldiff-algorithms
  • Data Structure DesignMediumAuto-graded
    Simulate Least-Recently-Used Cache Operations

    Tests your ability to implement a data structure that maintains access order and performs lookups, updates, and evictions efficiently.

    Data Structure Designhash-maplinked-listcacheordered-dict
  • Trees & GraphsMediumAuto-graded
    Largest Land Mass After One Water-to-Land Conversion

    Tests grid connected-component labeling and the ability to optimally merge adjacent island regions by flipping a single water cell to land.

    Trees & Graphsgraphbfs-dfsconnected-componentsgrid
  • Trees & GraphsMediumAuto-graded
    Smallest Valid Sequence with Dependencies

    Tests topological sorting with lexicographic tie-breaking and cycle detection in a directed graph.

    Trees & Graphstopological-sortgraphheapcycle-detection
  • Arrays & HashingMediumAuto-graded
    Puddles in a Valley: Water Volume Between Terrain Columns

    Tests whether a candidate can compute trapped water volume across a height profile using the two-pointer O(1)-space technique.

    Arrays & Hashingtwo-pointersprefix-maxarrays
  • Arrays & HashingHardAuto-graded
    Distinct Value Sum Across Peak-Score Square Ring Windows

    Tests 2D prefix sums, border enumeration, multi-way tie tracking, and cross-frame value deduplication on square ring-shaped windows of a matrix.

    Arrays & Hashing2d-prefix-summatrixsliding-window
  • Data Structure DesignMediumAuto-graded
    Contiguous Block Allocator with Tag-Based Memory Management

    Tests segment tree design for efficiently finding and tracking contiguous free blocks in a memory-like array with logarithmic-time allocation and release operations.

    Data Structure Designsegment-treeinterval-managementdata-structure-design
  • Data Structure DesignMediumAuto-graded
    Replay Operations on a Bounded LRU Cache

    Tests understanding of least-recently-used eviction by executing a sequence of cache operations and collecting their return values.

    Data Structure Designcachelruevictionsimulation
  • Arrays & HashingMediumAuto-graded
    Best Single-Breakpoint Step-Function Fit

    Tests whether a candidate can derive an O(n) prefix-aggregate sweep to find the one split index that minimizes total squared error for a two-segment constant model.

    Arrays & Hashingarraysmathprefix-sums
  • Arrays & HashingMediumAuto-graded
    Aggregate Tournament Standings from User Rankings

    Tests pairwise comparison aggregation, majority voting with tie-breaking, and ranking by win totals.

    Arrays & Hashingarrayssortingaggregation
  • Arrays & HashingEasyAuto-graded
    Neural Network Implementation of Centroid-Based Classification

    Derives the weight matrix and bias vector of a single-layer network that performs soft assignment to cluster centers using squared distance.

    Arrays & Hashingneural-networksclusteringlinear-algebra
  • StringsMediumAuto-graded
    Minimum Edit Distance to Make String a Palindrome

    Tests whether a candidate can compute the minimum number of single-character insertions needed to transform an arbitrary string into a palindrome using interval DP.

    Stringsstringsdynamic programmingpalindromesedit operations
  • Trees & GraphsMediumAuto-graded
    Resolve Variable Dependencies with Arithmetic

    Tests dependency graph traversal, cycle detection, and recursive evaluation of variables defined by arithmetic expressions.

    Trees & Graphsrecursiongraph-traversalcycle-detectionparsing
  • Greedy & IntervalsMediumAuto-graded
    Consolidate Overlapping Ranges

    Tests ability to sort intervals and merge adjacent or overlapping ranges into a minimal disjoint set.

    Greedy & Intervalsarrayssortinggreedy