KatInterview

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

Interview Practice Problems

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

5965
Problems
2208
Auto-graded
15
Topics
271
Added today

Showing 1–30 of 5965 results

  • BehavioralMediumModel answer
    Crafting Responses for a Game Studio Product Management Screen

    Prepare structured behavioral answers across six key product management themes tailored for a live-services mobile game studio interview.

    BehavioralBehavioral QuestionsProduct ManagementLeadershipLive Operations
  • Data Structure DesignMediumModel answer
    Deadlock-Free Atomic Funds Movement Between Shared Accounts

    Design a concurrent transfer operation over an in-memory account store that never loses updates, is all-or-nothing, preserves total money, and cannot deadlock.

    Data Structure Designconcurrencylockingdeadlockatomicity
  • Machine LearningHardModel answer
    On-Device Face Unlock for a Mobile Banking App at Scale

    Design a privacy-preserving, on-device face authentication system for a mobile app with tens of millions of users, covering models, evaluation, spoofing defenses, fairness, offline use and rollout.

    Machine Learningface-recognitionon-device-mlbiometricsanti-spoofing
  • Greedy & IntervalsMediumAuto-graded
    Consolidate Overlapping Time Intervals

    Evaluate ability to sort and combine overlapping or adjacent half-open numerical intervals in linear-arithmetic time.

    Greedy & Intervalsintervalssortingarraysgreedy
  • Heaps, Sorting & SearchEasyAuto-graded
    Adaptive Merge Sort with Comparison Counter

    Count element-level comparisons during an adaptive divide-and-conquer merge sort.

    Heaps, Sorting & Searchsortingdivide-and-conquerrecursionarrays
  • Arrays & HashingMediumAuto-graded
    Shortest Window Holding Exactly k Different Values

    Find the shortest contiguous slice of an integer list containing exactly k different values, using a sliding window with frequency counts.

    Arrays & Hashingsliding-windowhash-mapsubarraytwo-pointers
  • Math & Bit ManipulationEasyAuto-graded
    Theoretical Mean and Variance of Permutation Inversions

    Derive and evaluate the closed-form expected value and variance for the number of inversions in a uniformly random permutation.

    Math & Bit Manipulationmathcombinatoricsstatisticsprobability
  • System DesignMediumModel answer
    Build a Multi-User Live Text Editing Platform

    Design a service where many people edit one document at once, see each other's changes quickly, keep history, show live cursors, and can work offline, all while converging to one state.

    System Designsystem-designreal-timeoperational-transformationcrdt
  • Data Structure DesignMediumModel answer
    Python ABCs and the Three Kinds of Methods Explained

    Explain how abstract base classes work in Python and how instance, class and static methods differ in binding, inheritance behavior and typical use.

    Data Structure Designpythonoopabstract-classesclassmethod
  • System DesignMediumModel answer
    Stock Reservation Service for a Flash-Sale Storefront

    Design a stock service that reports sellable quantity and reserves items for orders without overselling under concurrency, with idempotent retries, expiry, and contention handling.

    System Designconcurrency-controlidempotencyinventorytransactions
  • Trees & GraphsHardModel answer
    Construct Non-Conflicting Queens Configurations

    Compute all possible configurations of n non-attacking queens on an n x n board using stateful depth-first search.

    Trees & Graphsbacktrackingrecursiondepth-first-search
  • Data Structure DesignMediumModel answer
    Handling Seekable Body Replays on 307 Redirects in Python requests

    Debug and implement stateful body rewind logic for seekable file-like streams when executing HTTP 307 redirects in an HTTP client library.

    Data Structure Designpythonhttpdebuggingstreams
  • Arrays & HashingEasyAuto-graded
    Check a Call Against a Catalog of Function Signatures

    Decide whether an ordered list of argument types fits any function in a catalog, given required, trailing optional, and variadic parameters with exact type matching.

    Arrays & Hashingsimulationarray-scanningsignature-matchingedge-cases
  • Trees & GraphsMediumAuto-graded
    Stop Listing and Indented Reporting Tree from Raw Inputs

    Parse a JSON string into formatted stop lines and turn employee rows into a sorted, indented reporting-tree outline using an adjacency list and iterative DFS.

    Trees & Graphsjsontreedfssorting
  • Statistics & ExperimentsMediumModel answer
    Judging Two Short-Form Ephemeral Content Products Head to Head

    Design a measurement plan to decide which of two sibling apps has the stronger ephemeral photo/video feature, covering metrics, confounders, and causal methods.

    Statistics & Experimentsmetric-designcausal-inferenceexperimentationproduct-analytics
  • BehavioralMediumModel answer
    Walking Through a Past Engineering Mistake and What Changed

    Behavioral question: recount a real technical error from an internship or project, explain its root cause, how you worked with others to fix it, and the lasting habits you built.

    Behavioralbehavioralaccountabilityroot-cause-analysisfeedback
  • Statistics & ExperimentsEasyModel answer
    Simulated Trading Round: Arbitrage, Bet Sizing, and Market Making

    Evaluate probability lines, identify structural arbitrage, determine optimal Kelly stake allocations, and quote dynamic markets during a multi-game simulation.

    Statistics & Experimentsprobabilityexpected-valuekelly-criterionarbitrage
  • System DesignMediumModel answer
    Design a Multi-Location Book Reservation & Inventory System

    Architect a distributed inventory, reservation, and circulation platform across multiple physical locations with transactional guarantees, idempotency, and search index synchronization.

    System Designsystem-designdistributed-systemsconcurrencydatabases
  • System DesignHardModel answer
    Global Link Shortener: Fast Redirects and Collision-Free Aliases

    Design a worldwide short-link service with fast, always-available redirects, unique compact IDs, custom aliases, expiry, and asynchronous click analytics.

    System Designsystem-designurl-shortenercachingid-generation
  • System DesignEasyModel answer
    Fastest Way to Get a 2 TB Dataset to a Colleague in San Francisco

    Estimate and compare network transfer against shipping physical storage for a 2 TB dataset, state assumptions, and identify when each approach wins.

    System Designback-of-envelopedata-transfernetworkingestimation
  • Statistics & ExperimentsMediumModel answer
    Raising Member Profile Completeness: Metrics, Gaps, Tests

    Design a measurement and experimentation plan to get more members of a professional network to fill out their profiles, from defining completeness to testing interventions.

    Statistics & Experimentsproduct-analyticsexperiment-designmetricssegmentation
  • Linked ListsMediumAuto-graded
    Min, Reverse, and Staircase Search in One Function

    Compute a list's minimum, its reversal, and whether a target exists in a row- and column-sorted matrix, all in one combined function.

    Linked Listslinked-listreversalmatrix-searchtwo-pointers
  • Trees & GraphsMediumAuto-graded
    Smallest-First Course Ordering With Cycle Check

    Produce the lexicographically smallest valid course order from prerequisite pairs, or an empty list if a cycle makes it impossible, using a topological sort with a min-heap.

    Trees & Graphstopological-sortgraphheapcycle-detection
  • BehavioralMediumModel answer
    Technical Ownership Story and Ship-Fast-Versus-Safe Judgment Call

    Prepare a structured account of a technically demanding project you led, plus a story about shipping under deadline pressure while managing correctness risk and technical debt.

    Behavioralbehavioraltechnical-leadershipproject-deep-divetrade-offs
  • Data Structure DesignMediumAuto-graded
    Locate a Traveler's Airport by Timestamp

    Process a batch of operations that load travel records and answer per-user point-in-time location queries using grouping, sorting and binary search.

    Data Structure Designbinary-searchhash-mapintervalsdesign
  • Arrays & HashingMediumAuto-graded
    Shortest Subarray with K Unique Values

    Find the minimum length of a contiguous subarray containing at least K unique elements using a sliding window.

    Arrays & Hashingsliding-windowtwo-pointershash-tablearrays
  • BehavioralMediumModel answer
    Pitching Your Product Background for a Luxury EV Software Role

    Prepare a connected set of answers for a premium electric-vehicle PM conversation: career story, company knowledge, motivation, future goals, and a user-experience case study.

    Behavioralbehavioralproduct-managermotivationux
  • SQL & DataMediumModel answer
    Last-Touch Ad Attribution: Daily Campaign Conversion Report

    Write a SQL query that credits each conversion to the latest eligible ad impression within a 7-day lookback, then reports daily campaign metrics for January 2024.

    SQL & Datasqlwindow-functionsattributionjoins
  • Trees & GraphsMediumAuto-graded
    Minimum Grid Manhattan Distance Between Target Characters

    Find the minimum Manhattan distance between any pair of target characters in a 2D character grid.

    Trees & Graphsbfsmatrixdistance-transformgraphs
  • Heaps, Sorting & SearchMediumAuto-graded
    Rolling Window Mean After Dropping the Largest k

    Compute the mean of each fixed-size window after discarding its k largest values, which needs a structure that supports fast insertion, deletion and sum-of-smallest queries.

    Heaps, Sorting & Searchsliding-windowfenwick-treeorder-statisticsheaps