KatInterview

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

Interview Practice Problems

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

6132
Problems
2274
Auto-graded
15
Topics
275
Added today

Showing 2851–2880 of 6132 results

  • Stacks & QueuesMediumAuto-graded
    Checkout Totals After Next Cheaper Coupon Item

    Find, for each element, the nearest later value that is less than or equal to it and subtract it, which tests monotonic stack reasoning on arrays.

    Stacks & Queuesmonotonic-stackarraysnext-smaller-element
  • BehavioralMediumModel answer
    Present Your Highest-Impact Project End to End

    Describe your most impactful past project: the problem, your role, the technical approach, success metrics, results, trade-offs, surprises and lessons learned.

    Behavioralbehavioralproject-deep-diveownershipmetrics
  • Machine LearningHardModel answer
    Why Early Layers Stop Learning: Diagnosing Tiny Gradients

    Explain why gradients can shrink as they flow backward through depth or time, how to detect it, and which fixes apply to which architectures, without confusing it with convergence.

    Machine Learningdeep-learningbackpropagationvanishing-gradientsinitialization
  • System DesignMediumModel answer
    Sizing and Securing a Deduplicating Document Vault

    Design a long-term document storage service: estimate storage with replicas, add ingestion-time deduplication, and layer encryption, key management, authorization and versioning.

    System Designcapacity-estimationdeduplicationencryptionobject-storage
  • Data Structure DesignMediumAuto-graded
    Fleet Billing Ledger With Time-Dated Per-Minute Rates

    Simulate a bike-fleet billing ledger where each ride is priced at the rate active at its start, with rate changes, duplicate ride ids and an exact total.

    Data Structure Designdesignsimulationbinary-searchdecimal-arithmetic
  • System DesignMediumModel answer
    Real-Time Hourly Popularity Ranking at 100K Events per Second

    Design a scalable service that ingests a massive stream of view events and serves the most popular items over a rolling 60-minute window, allowing slightly approximate results.

    System Designsystem-designstreamingtop-ksliding-window
  • Statistics & ExperimentsMediumModel answer
    Experiment Plan for a Run-Loop Suggestion Feature in a Maps App

    Plan a randomized experiment for a feature that suggests running loops in a maps app: choose metrics, define who enters the analysis, pick the randomization unit, set guardrails, and size the test.

    Statistics & Experimentsab-testingexperiment-designmetricspower-analysis
  • System DesignMediumModel answer
    Per-User Impression Limits for an Ad Serving Platform

    Design a low-latency service that stops an ad platform from showing a user the same ad or campaign more than an allowed number of times per time window, across regions.

    System Designsystem-designdistributed-systemscountersredis
  • System DesignMediumModel answer
    Threshold-Crossing Price Notifications at Scale

    Design a service where users set price-level triggers on securities and get notified quickly, exactly once, through push, email or SMS, even during market-open bursts.

    System Designsystem-designevent-drivennotificationsdeduplication
  • BehavioralMediumModel answer
    Walking Through a Technical Project You Owned, End to End

    Present a project you led as a structured narrative: the problem, a real design trade-off, how you handled disagreement, and what you would change in hindsight.

    Behavioralbehavioralproject-deep-diveownershiptrade-offs
  • Statistics & ExperimentsMediumModel answer
    A/B Test Plan for a Selfie Liveness Step in Signup

    Plan an experiment for a new selfie-based liveness check in onboarding: pick metrics, choose a randomization unit that survives fraudster behavior, size the test, and handle uneven pass rates.

    Statistics & Experimentsab-testingexperiment-designpower-analysisinterference
  • System DesignMediumModel answer
    Speeding Up a Cold Storefront Page and a 10M-Row Browser Table

    Audit and cut a 5-second cold-cache load on a retail landing page, then design a browser table that can browse 10 million API records without freezing or crashing.

    System Designfrontend-performanceweb-vitalsvirtualizationpagination
  • System DesignHardModel answer
    Hardening a Duplicate-File Finder Against Real Filesystems

    Design a duplicate-file cleanup tool that survives live, messy filesystems: handle errors, races, loops, scale and hash choices, and make deletions provably safe.

    System Designfile-deduplicationfilesystemshashingconcurrency
  • Math & Bit ManipulationEasyAuto-graded
    Feed Ad Load: Random Slots vs. Fixed Block Quota

    Compute expected ad counts for two feed ad policies and the chance of seeing at least one ad in a window, using linearity of expectation and the complement rule.

    Math & Bit Manipulationprobabilityexpectationmathcomplement-rule
  • Data Structure DesignMediumAuto-graded
    Three Mini Simulations: Case Folding, Aligned Allocator, Run Counter

    Solve three independent simulations: case-insensitive adjacent changes, an 8-aligned memory allocator, and online counting of same-color runs on a line.

    Data Structure Designsimulationstringshash-mapstate-maintenance
  • Data Structure DesignMediumModel answer
    Live-Streaming Prompt Box with Incremental Reply Rendering

    Design and code a small front-end component that sends a prompt, renders a streamed reply as it arrives, blocks duplicate sends, supports cancel, and shows loading and error states.

    Data Structure Designfrontendreactstreamingasync-state
  • BehavioralMediumModel answer
    Four Behavioral Stories: Feedback, Conflict, Motivation, Failure

    Prepare structured stories on giving feedback, resolving a disagreement, explaining why you want a marketplace employer, and owning a mistake, with follow-ups on impact and lessons.

    Behavioralbehavioralstar-methodfeedbackconflict-resolution
  • Machine LearningMediumModel answer
    From Raw Text to Aligned Assistant: Building and Testing an LLM

    Walk through how a foundation model becomes a safe, helpful assistant: pretraining, SFT versus preference optimization, reward modeling pitfalls, and evaluation including reward hacking detection.

    Machine Learningllmrlhfdporeward-modeling
  • Data Structure DesignMediumAuto-graded
    Square Grid Line-Completion Referee

    Process a batch of moves on an n x n two-player grid and report after each move whether the mover has completed a full row, column, or diagonal, using constant-time per-move bookkeeping.

    Data Structure Designdesignsimulationcountingmatrix
  • Statistics & ExperimentsMediumModel answer
    Bootstrap: Measuring Variance Versus Shrinking It

    Explain whether resampling can make an estimator more precise, separating bootstrap standard errors from bagging, with one example where it fails and one where it helps.

    Statistics & Experimentsbootstrapbaggingvarianceresampling
  • System DesignMediumModel answer
    Walking Through a Python venv Bootstrap Shell Script

    Explain each line of a bash script that builds a Python virtual environment, predict its output and files, and argue why shell automation suits environment setup.

    System Designbashpython-venvpipautomation
  • Trees & GraphsMediumAuto-graded
    Surviving Tree Height and Extra Removals to Meet a Limit

    Compute the height of a tree after removing marked nodes (cutting off their subtrees), then find the fewest extra removals needed to bring the height within a limit.

    Trees & Graphstreedfsiterative-traversalheight
  • Data Structure DesignMediumAuto-graded
    LRU Store with Rolling Mean Over Recent Writes

    Simulate a batch of operations on an LRU key-value store that also tracks a rolling mean of the last k written values, with O(1) per operation.

    Data Structure Designlru-cachehash-mapdequesliding-window
  • SQL & DataMediumAuto-graded
    Pick the Title Winner from Mixed-Orientation Game Records

    Given team and game record lists, find the 2023 championship winner when the winner may be on either side, with a deterministic highest-score tie-break.

    SQL & Datadata-manipulationjoinsfilteringhash-map
  • Statistics & ExperimentsHardModel answer
    Why Did Engagement Rate Fall After a New Feed Module Shipped?

    Diagnose a fall in home-page click rate in an A/B test where DAU and time spent are flat, covering metrics, diagnosis steps, segment cuts, and a rollback-or-iterate decision framework.

    Statistics & Experimentsab-testingmetric-designroot-cause-analysissegmentation
  • Greedy & IntervalsMediumAuto-graded
    Emptying Depots With a Limited Pool of Partner Skips

    Compute the minimum skips each depot needs using modular arithmetic, then greedily pick the cheapest depots under a shared skip budget to maximize emptied depots.

    Greedy & Intervalsgreedymathsortingmodular-arithmetic
  • BehavioralMediumModel answer
    Owning and Defending a Major Backend Project Under Probing

    Prepare to present one significant backend project, then justify its decisions, trade-offs, measured impact and lessons through repeated follow-up questions that test ownership and judgment.

    Behavioralbehavioralproject-deep-diveownershiptrade-offs
  • Trees & GraphsMediumAuto-graded
    Two-Choice Clinic Booking: Can Everyone Get a Slot?

    Decide whether each patient can get one of their two acceptable slots with no slot reused, by modelling slots as graph vertices and patients as edges.

    Trees & Graphsunion-findgraph-modelingmatchingconnected-components
  • Data Structure DesignEasyAuto-graded
    Replay Ledger Commands on a Guarded Account

    Simulate an account that processes a list of deposit, withdraw, balance and history commands, rejecting invalid amounts and overdrafts while recording only successful transactions.

    Data Structure Designsimulationclass-designstate-managementvalidation
  • Math & Bit ManipulationMediumAuto-graded
    Tie-Aware Ranking Probabilities for Three and Four Tasters

    Derive conditional ranking probabilities for i.i.d. scores, with and without ties, and return them as a dictionary keyed by named quantities.

    Math & Bit Manipulationprobabilitycombinatoricsconditional-probabilityclosed-form