KatInterview

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

Interview Practice Problems

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

5997
Problems
2221
Auto-graded
15
Topics
270
Added today

Showing 511–540 of 5997 results

  • System DesignMediumModel answer
    Build a Durable, Replicated Key-Value Store Step by Step

    Design a store with put, get and delete that starts as a single-node storage engine and grows into a partitioned, replicated cluster with defined consistency and failure handling.

    System Designkey-value-storereplicationpartitioninglsm-tree
  • Statistics & ExperimentsMediumModel answer
    Choosing a Feed Ranking Variant From Negative Effect Intervals

    Three ranking variants all lower engagement, each with a 95% confidence interval. Interpret the intervals, weigh downside risk against a tolerance, and recommend which variant to ship.

    Statistics & Experimentsconfidence-intervalsab-testingpractical-significancerisk-assessment
  • System DesignHardModel answer
    Limited-Stock Flash Sale Platform with Zero Oversell

    Design a platform that sells a fixed number of seats or units to millions of simultaneous buyers, with no oversell, no double charge, and graceful behavior under failure.

    System Designsystem-designhigh-concurrencyredisidempotency
  • Data Structure DesignMediumModel answer
    Build a Minesweeper Engine That Scales to Huge Sparse Grids

    Design a Minesweeper class with board rendering and click handling via flood fill, then adapt it to enormous boards with few mines using lazy state and on-demand counting.

    Data Structure Designdesignflood-fillbfssparse-data-structures
  • Machine LearningMediumModel answer
    Screening Pipeline for Abusive Jobs and Memory Crashes

    Design an ML-backed gate for a shared compute platform that flags abusive submitted code or text and predicts memory-exhaustion crashes, with low latency, high precision, and drift monitoring.

    Machine Learningml-system-designcontent-moderationresource-forecastingadversarial-robustness
  • Trees & GraphsMediumAuto-graded
    Fastest Signal Arrival Times Across a Relay Grid

    Compute shortest-path distances from one source in an undirected graph with non-negative weights, handling parallel edges, self-loops, and unreachable nodes.

    Trees & Graphsdijkstrashortest-pathgraphheap
  • Arrays & HashingMediumAuto-graded
    Richest Window of Stalls Under Count and Distance Limits

    Find the best sum over a contiguous run of position-sorted items, limited by item count and coordinate span, using sorting and a two-pointer sweep.

    Arrays & Hashingsliding-windowtwo-pointerssortingprefix-sums
  • BehavioralEasyModel answer
    Crafting Your PM Opening Pitch for a Crypto Exchange

    Prepare three short, honest answers for a PM screen: your background, why a crypto financial platform, and your five-year growth path, with structure, sample wording and pitfalls.

    Behavioralbehavioralproduct-managementhr-screencareer-narrative
  • Machine LearningMediumModel answer
    Speeding Up a 175B-Parameter LLM Serving Cluster

    Diagnose and fix low GPU utilization and high latency in a large transformer serving fleet, covering KV cache memory, compute efficiency and multi-node communication.

    Machine Learningllm-servingkv-cachequantizationtensor-parallelism
  • Machine LearningHardModel answer
    Building a Low-Latency Ad Ranking Pipeline with ML

    Design an end-to-end ML system that picks personalized ads for millions of users within a tight latency budget, covering data, models, exploration, evaluation and scaling.

    Machine Learningctr-predictionrecommendationbanditscounterfactual-evaluation
  • Trees & GraphsHardAuto-graded
    Distinct Transitive Prerequisites in a Dependency DAG

    For each node in a DAG whose links may name unknown items, count the distinct nodes reachable along link direction, counting shared descendants once.

    Trees & Graphsgraphdagtopological-sortbitset
  • Trees & GraphsMediumAuto-graded
    Does This One-Way Network Contain a Loop?

    Decide whether a directed graph given as an adjacency list contains a cycle, handling self-loops, parallel edges, disconnected parts and an empty graph.

    Trees & Graphsgraphdirected-graphcycle-detectiontopological-sort
  • BehavioralMediumModel answer
    Scaling Risk Two Weeks Before a Fixed Launch Date

    Describe a time you balanced a hard business deadline against a known scalability risk, covering risk analysis, team alignment, leadership persuasion and post-launch follow-through.

    Behavioralbehavioralleadershiptrade-offstechnical-debt
  • System DesignMediumModel answer
    Build a Large-Scale Live Video Broadcasting Service

    Design a platform where creators broadcast live video to millions of viewers with low delay, adaptive quality, real-time chat, stream discovery, and replay after the stream ends.

    System Designsystem-designlive-streamingcdnhls
  • Heaps, Sorting & SearchMediumAuto-graded
    Find Earliest Compatible Release Version

    Find the smallest semantic version that satisfies a monotonic compatibility check while minimizing evaluations.

    Heaps, Sorting & Searchbinary-searchsortingarrays
  • BehavioralMediumModel answer
    Walk Through a Large Infrastructure Project You Drove

    Describe a multi-team infrastructure project you owned from start to finish, covering your technical direction, stakeholder buy-in, risk and incident handling, trade-offs, and measured results.

    Behavioralbehavioralleadershipinfrastructurestakeholder-management
  • System DesignMediumModel answer
    Keeping Courier Payouts Correct When the Processor Is Flaky

    Design a payout pipeline that stays correct and pays each courier exactly once when the downstream payment processor is slow, erroring, or down for hours.

    System Designidempotencyretriescircuit-breakerdead-letter-queue
  • Statistics & ExperimentsMediumModel answer
    Metrics, Experiment Design and Sample Sizing for a Consumer App

    Choose a consumer app, model a new revenue stream, define metrics, prioritize an improvement, size an A/B test for a 15% to 17% conversion lift, and defend its cost.

    Statistics & Experimentsab-testingsample-sizeproduct-metricspower-analysis
  • Heaps, Sorting & SearchMediumAuto-graded
    Most Frequent Ads Within a Closed Time Range

    Select the K most frequent ad IDs among timestamped impressions in an inclusive window, breaking ties by smaller ID; tests binary search on sorted data plus counting and ordering.

    Heaps, Sorting & Searchbinary-searchhash-mapsortingsliding-window
  • System DesignMediumModel answer
    Building a Request Throttling Service That Scales Across Regions

    Design a service that decides per caller whether each API request is allowed, then scale it to many users and regions and make its limits more accurate, discussing the trade-offs.

    System Designrate-limitingdistributed-systemsredistoken-bucket
  • Linked ListsEasyAuto-graded
    Filter Alternate Nodes in a Sequence

    Tests the ability to process a linear collection by dropping elements at even 1-based index positions.

    Linked Listslinked-listsarrayspointers
  • Math & Bit ManipulationEasyAuto-graded
    Compute Multi-User Feature Adoption Metrics

    Given population size and individual adoption probability, calculate key expectation, probability, and conditional probability metrics under Bernoulli assumptions.

    Math & Bit Manipulationmathprobabilitystatisticsnumerical-methods
  • Trees & GraphsMediumModel answer
    Mapping a Hidden Maze: Shortest Route for a Sensing Robot

    A robot in an unseen grid senses neighbours for free and pays per move. Find a shortest route to a target, or return to the start and report failure if none exists.

    Trees & Graphsbfsgridonline-explorationshortest-path
  • BehavioralMediumModel answer
    Two Behavioral Stories: Unclear Goals and Principled Pushback

    Prepare two structured stories: one about producing results when goals are undefined, and one about disagreeing with a colleague or manager while preserving trust and committing to the outcome.

    Behavioralbehavioralstar-methodambiguityconflict-resolution
  • SQL & DataMediumModel answer
    Rolling Spend View, Dependent Inserts, and Price Change Fallout

    Build a 7-day spend view over three tables, add rows in foreign-key order, update statuses and prices, then reason about how a price change distorts past spend.

    SQL & Datasqlviewsleft-joininsert-update
  • Machine LearningHardModel answer
    Linear Regression, Tree Ensembles, Rare Fraud, and Seasonal Forecasting

    Explain OLS and its assumptions, compare bagging, random forests and boosting, handle a 0.2% positive class, and outline a forecasting pipeline for data with trend and seasonality.

    Machine Learningolsensemblesclass-imbalancetime-series
  • System DesignMediumModel answer
    Build a Fleet-Wide Error Frequency Tracking Platform

    Design a shared platform that ingests error logs from many apps, collapses similar messages into one signature, and answers count, trend and top-N queries reliably during incident spikes.

    System Designsystem-designstreamingaggregationtime-series
  • Greedy & IntervalsEasyAuto-graded
    Shift Pay Totals Across Time-of-Day Wage Bands

    Sum payouts for work sessions by intersecting each session with non-overlapping hourly wage bands, using interval overlap arithmetic.

    Greedy & Intervalsintervalsoverlapsimulationarrays
  • Trees & GraphsMediumModel answer
    Right Edge of a Tree and Minimal Bracket Removal

    Two linked tasks: list the nodes visible from the right of a binary tree, and delete the fewest parentheses from a string so the rest is balanced.

    Trees & Graphsbinary-treebfsstackstrings
  • System DesignHardModel answer
    Atomic Updates Across Orders, Payments and Inventory Services

    Design a protocol that keeps writes consistent across several services and databases, comparing 2PC, 3PC and Sagas, and covering failures, retries, timeouts and delivery guarantees.

    System Designdistributed-transactionstwo-phase-commitsagaidempotency