KatInterview

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

Interview Practice Problems

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

6120
Problems
2268
Auto-graded
15
Topics
271
Added today

Showing 3301–3330 of 6120 results

  • Statistics & ExperimentsHardModel answer
    Measuring User Exposure to Policy-Violating Posts

    Design a metric framework for how often users see harmful content: definitions, timing rules, north-star choice, uncertainty-aware alerts, and an A/B test under delayed labels.

    Statistics & Experimentsmetric-designcontent-safetyexperimentationconfidence-intervals
  • Data Structure DesignEasyAuto-graded
    Bidirectional Page Navigation with Integer Cursors

    Simulate a paginator that serves pages forward and backward from integer cursors, with correct clamping at both ends and for a short final page.

    Data Structure Designdesignpaginationsimulationarray-slicing
  • Statistics & ExperimentsMediumModel answer
    Grow Profit in a Deal-Finding Browser Extension and Rewards App

    Product case on a shopping-savings app: map revenue streams, pick one improvement, design a test, judge two promo email A/B results, and critique email UX.

    Statistics & Experimentsproduct-senseab-testingmonetizationemail-ux
  • Statistics & ExperimentsMediumModel answer
    Expected Rolls Until a Die Shows a Strict Rise

    Find the expected number of fair-die rolls until a roll is strictly higher than the one before it, using a Markov-state recursion and an independent counting check.

    Statistics & Experimentsprobabilityexpected-valuemarkov-chainstopping-time
  • SQL & DataMediumModel answer
    Trust & Safety Exposure Queries on Daily Post Views

    Write three SQL queries over daily post views and per-policy risk scores: a windowed view threshold, nudity exposure share, and a monthly flagged-type mix.

    SQL & Datasqlwindow-functionsjoinsaggregation
  • Statistics & ExperimentsMediumModel answer
    Measuring a Quick-Reaction Feature in a Chat App

    Plan the metrics, a network-aware experiment, and the launch decision for a message-reaction feature that lifts reactions but slightly lowers total message volume.

    Statistics & Experimentsab-testingnetwork-effectsmetricscluster-randomization
  • Stacks & QueuesMediumAuto-graded
    Validate Balanced Round, Square and Curly Brackets

    Decide whether a string of three bracket kinds is balanced, testing last-in-first-out matching with a stack and handling crossings and leftover or stray brackets.

    Stacks & Queuesstackstringsparsingbracket-matching
  • System DesignMediumModel answer
    Uniform Error Responses in a Spring Banking API

    Design a centralized Spring exception handling layer that returns one JSON error contract, maps domain errors to HTTP codes, hides internals, and ties each response to server logs via a trace ID.

    System Designjavaspringexception-handlingrest-api
  • Data Structure DesignMediumAuto-graded
    Quota-Based Storage Service Simulator with Snapshots

    Simulate a command stream on a storage service with per-user quotas, ownership transfer, prefix-based top-n listing, and per-user snapshot and restore.

    Data Structure Designdesignhash-mapsimulationsorting
  • Math & Bit ManipulationEasyAuto-graded
    Dice Duel Wager: Expected Profit and Play Decision

    Compute the expected profit of a two-dice wager where ties favor the opponent, and decide whether a risk-neutral player should accept it.

    Math & Bit Manipulationprobabilityexpected-valuemathdice
  • Math & Bit ManipulationEasyAuto-graded
    Five Quick Probability Puzzles: Dice, Deck, Coins, Boxes

    Work out five small probability puzzles using symmetry, complements, counting and pigeonhole, and return the exact answers as fraction strings in order.

    Math & Bit Manipulationprobabilitycombinatoricspigeonholesymmetry
  • Trees & GraphsMediumAuto-graded
    Course Plan Builder with Already-Passed Classes

    Build a valid course order from prerequisite pairs while skipping passed courses, using a topological sort with a fixed tie-break order and cycle detection.

    Trees & Graphstopological-sortgraphbfscycle-detection
  • Data Structure DesignMediumAuto-graded
    Snapshot-based key-value store with checkpoint and reload

    Simulate a key-value store that serializes its full contents on checkpoint and replaces live state on reload, testing state management and round-trip serialization.

    Data Structure Designdesignserializationkey-value storestate management
  • Machine LearningMediumModel answer
    Turning an ML Experiment Into Lessons for Agent Design

    Describe a recent ML experiment you owned, separate measurement from interpretation, and show how its findings would shape a concrete component of an autonomous agent.

    Machine Learningresearch-communicationai-agentsexperiment-designevaluation
  • BehavioralMediumModel answer
    Resisting a Premature Call-Volume Mandate With Evidence

    A sales leader wants to double call volume based on a raw correlation with win rate. Explain how you would push back, design a safe pilot, set expectations, align stakeholders, and resist early declarations of success.

    Behavioralcausal-inferencestakeholder-managementexperiment-designdata-science-leadership
  • System DesignMediumModel answer
    Designing a Reliable Checkout and Charge Pipeline

    Sketch a high-level payment backend that charges customers via a third-party provider, guaranteeing no double charges and no orders marked paid without collected funds.

    System Designpaymentsidempotencystate-machineledger
  • Math & Bit ManipulationEasyAuto-graded
    Sales Volume Needed to Hold Margin After a Menu Expansion

    Derive a closed-form sales volume that keeps profit margin unchanged after adding a second product with extra fixed costs, and reject unreachable targets.

    Math & Bit Manipulationmathalgebrabreak-evenprofit-margin
  • Arrays & HashingMediumAuto-graded
    Probability Toolkit: Gamble Moments, Dice, Arrivals, Odds, Draws

    Compute expected value and variance, a dice conditional probability, a Poisson tail, betting edge with Kelly sizing, and a without-replacement card probability in one function.

    Arrays & Hashingprobabilityexpected-valueconditional-probabilitypoisson
  • Arrays & HashingEasyAuto-graded
    Rolling window totals over filtered records in input order

    Tests filtering a list of tagged records and computing rolling window totals in O(n) using an incremental sum instead of recomputing each window.

    Arrays & Hashingsliding-windowprefix-sumfilteringarrays
  • System DesignMediumModel answer
    Backend design for live multi-user text editing with conflict handling

    Design a server that orders and merges simultaneous keystrokes from many editors on one document, converges all replicas, and survives failures.

    System Designcollaborative-editingoperational-transformationreal-timeconsistency
  • System DesignMediumModel answer
    Workspace Chat Platform with Per-Org Isolation

    Design a chat backend for many isolated organizations, covering ordered channel history, offline catch-up, permission-aware search, presence, and read tracking.

    System Designmulti-tenancymessagingreal-timepermissions
  • Machine LearningMediumModel answer
    Bias-Variance, Calibration, and Drift: A Production ML Walkthrough

    Explain the bias-variance decomposition, what a calibrated probability means and how to repair one, and how concept drift differs from covariate shift in production.

    Machine Learningbias-variancecalibrationmodel-driftcovariate-shift
  • Greedy & IntervalsMediumAuto-graded
    Locate the Lowest-Indexed Room That Can Fit a Meeting

    Tests interval overlap checks under half-open semantics and using binary search on sorted, disjoint bookings to find a free room quickly.

    Greedy & Intervalsintervalsbinary-searchsortinghalf-open-ranges
  • BehavioralMediumModel answer
    Behavioral Screen: Recovering From a Failure and Choosing a Target Company

    Model answer for a PM-style HR screen: a STAR+L account of a real failure or conflict, plus a specific, research-backed case for why you want to join a given company.

    Behavioralbehavioralstar-lownershipconflict-resolution
  • Stacks & QueuesEasyAuto-graded
    Nested Delimiter Checker for Config Expressions

    Checks whether a string of mixed parentheses, braces, and square brackets is properly nested, testing stack-based matching and early rejection in linear time.

    Stacks & Queuesstackparsingstringmatching
  • Statistics & ExperimentsMediumModel answer
    Shared vs. split queues, height mixtures, and shrinkage bias

    Compare a single bank queue with separate lines, reason about height and social-degree distributions, and check whether lasso and ridge estimators are unbiased.

    Statistics & Experimentsqueueing theorydistributionsmixture modelsskewness
  • BehavioralMediumModel answer
    Nine Rapid-Fire Behavioral Prompts: Concise STAR Stories With Metrics

    Practice answering nine back-to-back behavioral prompts in 60–90 seconds each, using specific personal actions and quantified outcomes.

    BehavioralSTARbehavioral interviewconflict resolutioninfluence
  • Arrays & HashingMediumAuto-graded
    Detect a Run of Two or More Elements Summing to a Multiple of k

    Tests prefix-sum reasoning with hashing: detecting a contiguous run of length at least two whose sum is divisible by k, including the k = 0 special case.

    Arrays & Hashingprefix sumhash mapremainderssubarray
  • Data Structure DesignMediumAuto-graded
    LRU Cache Simulator with Recency and Grouped Views

    Simulates an LRU cache through a sequence of put, get, and snapshot operations, testing recency bookkeeping, eviction, and ordered grouping of values.

    Data Structure DesignLRU cacheOrderedDicthash mapsimulation
  • Data Structure DesignMediumAuto-graded
    Batch Simulation of an Expiring LRU Key-Value Store

    Replay a batch of timestamped get and set operations against a fixed-capacity store that combines per-key expiry with least-recently-used eviction.

    Data Structure Designhash maplinked listLRU cachesimulation