KatInterview

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

Coding Interview Problems

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

6013
Problems
2228
Auto-graded
15
Topics
273
Added today

Showing 2011–2040 of 2781 results

  • StringsMediumAuto-graded
    Group Words by Character Frequency

    Tests hash map construction with canonical keys to partition strings by anagram equivalence

    Stringshash-mapsortingstring-manipulation
  • Dynamic ProgrammingMediumAuto-graded
    Prime-Step Path Score + Bottleneck Throughput Boost

    Tests DP over prime-length jumps on an array and binary search on a "maximize the minimum" pipeline scaling problem, combined into one function.

    Dynamic Programmingdynamic-programmingbinary-searchnumber-theory
  • Arrays & HashingMediumAuto-graded
    Contiguous Subarray with Sum Divisible by K

    Tests whether a candidate can apply prefix-sum modular arithmetic to detect a length-≥2 subarray whose sum divides evenly by k in linear time.

    Arrays & Hashingprefix-sumhash-mapmodular-arithmetic
  • Data Structure DesignHardAuto-graded
    In-Memory Cell Grid with Formula Chaining

    Tests dependency graph design, lazy cache invalidation, recursive formula evaluation, and cycle detection in a grid of named cells.

    Data Structure Designdesigngraphssimulation
  • Heaps, Sorting & SearchHardModel answer
    Binary Search with Delayed Feedback Protocol

    Find a hidden number using binary search when each query returns the result of your previous guess instead of your current one.

    Heaps, Sorting & Searchbinary-searchalgorithmsfeedback-systems
  • Data Structure DesignMediumModel answer
    Extend a Python Abstract Pipeline with a Concrete File Processor

    Implement a concrete subclass inside a pre-built abstract framework that streams CSV input, transforms rows to JSON, and self-registers with a CLI factory.

    Data Structure Designobject-oriented-designabstract-base-classfile-iostreaming
  • Arrays & HashingMediumModel answer
    Sliding Tile Board: Merge Logic for All Four Directions

    Implement the slide-and-merge move for a 2048-style grid in all four directions, sharing a single merge routine across every direction.

    Arrays & Hashingarrayssimulationmatrix
  • StringsMediumModel answer
    Python Lists vs Tuples: Mutability, Memory, and Use Cases

    Compare Python lists and tuples across mutability, memory layout, hashability, and idiomatic use, including tricky edge cases.

    Stringspythondata-structuresmutabilityhashability
  • Data Structure DesignMediumAuto-graded
    Sliding-Window Traffic Throttle with Dual Limit Rules

    Tests sliding-window counting over timestamped event logs using per-source and per-source-destination deque-based rate limiting.

    Data Structure Designsliding-windowdequehash-mapsimulation
  • Stacks & QueuesMediumAuto-graded
    Cascade Removal of Equal Neighbor Groups

    Tests stack-based simulation of iterative removals that trigger chain reactions when fragments recombine.

    Stacks & Queuesstackstringsimulation
  • Math & Bit ManipulationEasyAuto-graded
    Calculate QR Campaign Funnel Metrics

    Tests understanding of multi-stage conversion funnels by computing metrics at each step given input rates.

    Math & Bit Manipulationmathfunnel-analysisconversions
  • Arrays & HashingMediumAuto-graded
    Probability the Third Card Is an Ace After an Ace Appears

    Compute a conditional probability for drawing three cards without replacement by splitting on how many aces the first two draws contain.

    Arrays & Hashingprobabilityconditional-probabilitycountingcombinatorics
  • Arrays & HashingMediumAuto-graded
    Clockwise Rotation with Frozen Diagonals

    Simulate clockwise 90° rotation on a square grid while keeping all main-diagonal and anti-diagonal elements fixed in place.

    Arrays & Hashingmatrixsimulationrotation
  • Data Structure DesignMediumAuto-graded
    Four-Card Hand Ranker with Extensible Type System

    Tests object-oriented design skills by building a modular, open/closed hand classifier and comparator for a custom four-card game.

    Data Structure Designoopdesignsimulation
  • Linked ListsMediumAuto-graded
    Detect Functional-Graph Cycle Start on an Index Array

    Tests cycle detection (Floyd's or similar) on an implicit linked list encoded as a next-pointer array, requiring the candidate to find where the cycle begins.

    Linked Listslinked listscycle detectiontwo pointersFloyd's algorithm
  • Data Structure DesignHardModel answer
    Ride-Share Wallet: Credit Vouchers, Zone Surcharges, and Refunds

    Simulate a ride-share payment ledger that drains expiring vouchers in priority order, applies zone-based surcharges to card charges, and splits refunds between card and new store credit.

    Data Structure Designsimulationpriority-queueinteger-mathstate-machine
  • Trees & GraphsMediumAuto-graded
    Answer Reachability Queries on an Undirected Graph

    Build connected components from an edge list with Union-Find, then answer many connectivity queries quickly.

    Trees & Graphsunion-findgraphdisjoint-setconnectivity
  • Trees & GraphsMediumAuto-graded
    Best Meeting Point Across All Stations in a City Grid

    Tests multi-source BFS on a grid to find the open cell with the smallest total shortest-path distance to every station, respecting walls and blocked cells.

    Trees & Graphsbfsgridshortest-path
  • Data Structure DesignMediumAuto-graded
    Mini Spreadsheet: Cell Formulas and Cycle Detection

    Tests dependency graph modeling, cycle detection on writes, and correct value propagation across a simple formula-based spreadsheet engine.

    Data Structure Designgraphsdfsdesign
  • Heaps, Sorting & SearchMediumAuto-graded
    Collapse Repeat Visits and Order the Result

    Tests array manipulation, hash-based deduplication, and implementing an O(n log n) sort from scratch without relying on built-in sort utilities.

    Heaps, Sorting & Searcharrayssortinghashingheapsort
  • Dynamic ProgrammingMediumAuto-graded
    Find Maximum Strictly Ascending Subsequence Length

    Tests dynamic programming optimization using binary search to efficiently compute the longest strictly increasing subsequence in O(n log n) time.

    Dynamic Programmingbinary-searchsubsequencesgreedy
  • Dynamic ProgrammingMediumAuto-graded
    Ways to Decode a Numeric String into Letters

    Tests dynamic programming reasoning on sequential digit-to-letter mappings, including careful handling of zeros and invalid two-digit pairs.

    Dynamic Programmingdynamic-programmingstringsrecursion
  • Trees & GraphsMediumAuto-graded
    Longest Path in an Undirected Tree

    Tests whether a candidate can find the longest edge-path in a tree using two linear-time traversals and reason about why the approach is correct.

    Trees & Graphsbfstreesgraph-traversal
  • StringsMediumAuto-graded
    Longest Window of Unique Characters

    Tests whether a candidate can apply a sliding window with a character index map to find the longest contiguous run of non-repeating characters.

    Stringssliding-windowhash-maptwo-pointers
  • StringsMediumAuto-graded
    Total Palindrome Substring Count

    Tests the ability to efficiently enumerate all palindromic substrings using center expansion and handle both odd and even-length cases.

    Stringspalindromestwo-pointersstring-manipulation
  • StringsMediumAuto-graded
    Reconcile Payments with Invoices Using Memo and Amount

    Tests multi-pattern substring search, hash-based indexing, and greedy reconciliation with priority-based tie-breaking across two matching strategies.

    Stringsstring-matchinghash-mapgreedyaho-corasick
  • Data Structure DesignMediumModel answer
    Event-Driven Email Notification System with Account Updates

    Build a scheduler that emits subscription notifications in time order, handling plan switches and subscription extensions with deterministic tie-breaking.

    Data Structure Designheapssimulationevent-drivenscheduling
  • Math & Bit ManipulationHardAuto-graded
    Compute Complexity Bounds for Dense Matrix Operations

    Tests asymptotic analysis skills by deriving time and space complexity for dense matrix multiplication with multiple dimensions.

    Math & Bit Manipulationcomplexity-analysislinear-algebrabig-o
  • Trees & GraphsMediumAuto-graded
    Fewest Cells Through a Diagonal-Move Grid

    Find the length of the shortest 8-directional clean-cell path across a square 0/1 grid using BFS.

    Trees & Graphsbfsgridshortest-path
  • Data Structure DesignMediumAuto-graded
    Shared Token Bucket with Optimistic Concurrency

    Tests implementation of a token bucket rate limiter over a versioned key-value store, including lazy replenishment, clock skew tolerance, and CAS-based retry logic.

    Data Structure Designdesignconcurrencysimulation