KatInterview

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

Interview Practice Problems

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

5972
Problems
2212
Auto-graded
15
Topics
273
Added today

Showing 5821–5850 of 5972 results

  • System DesignEasyModel answer
    C Pointers, printf Format Specifiers, and Memory Segments

    Test your grasp of C pointer semantics, how printf interprets variadic arguments, and where different kinds of data live in a process's memory layout.

    System DesignCpointersmemory-layoutprintf
  • Machine LearningEasyModel answer
    Choose the Right Randomization Unit for an A/B Test

    Decide whether to randomize by user, session, or request for a new ML-powered feature, and explain the consequences of each choice.

    Machine Learningmachine learningonline experimentsA/B testingstatistics
  • Arrays & HashingEasyAuto-graded
    Complete the Run: Find the Gap in a Five-Card Sequence

    Tests ability to handle encoded card ranks, Ace-as-low/high semantics, ambiguous endpoints, and missing-element logic in a fixed consecutive sequence.

    Arrays & Hashingarraysstringsenumeration
  • Statistics & ExperimentsEasyModel answer
    Compute Disease Test Probability with Bayes' Theorem

    Given a rare disease prevalence and known test accuracy rates, calculate the probability that a positive test result actually indicates disease.

    Statistics & Experimentsconditional probabilityBayes theoremstatisticsprobability
  • SQL & DataHardAuto-graded
    Compute Per-Category Running Revenue with Reset on Loss

    Tests ability to implement window-style running totals that accumulate per category but reset to zero whenever a loss (negative value) would pull the running total below zero.

    SQL & Datawindow functionsrunning totalsdata cleaningsimulation
  • Trees & GraphsMediumAuto-graded
    Connected Land Regions in a Character Matrix

    Tests graph traversal and connected-component identification on a 2D grid using flood-fill techniques.

    Trees & Graphsgraph-traversaldfsconnected-componentsgrid
  • Dynamic ProgrammingEasyAuto-graded
    Count Paths Through a Grid with Blocked Cells

    Tests whether a candidate can apply bottom-up DP on a 2-D grid to count reachable paths from top-left to bottom-right while respecting blocked cells.

    Dynamic Programmingdynamic programminggridpaths
  • StringsMediumAuto-graded
    Decode a Run-Length Encoded String With Nested Groups

    Tests the ability to parse and expand a run-length encoded string that contains arbitrarily nested bracket groups, combining stack-based parsing with string manipulation.

    Stringsstringsparsingstackrun-length encoding
  • Statistics & ExperimentsHardModel answer
    Decompose MSE into Bias² and Variance for a Shrinkage Estimator

    Derive the bias-variance decomposition analytically, then apply it to a ridge-like shrinkage estimator and reason about the optimal shrinkage level.

    Statistics & Experimentsstatisticsbias-variance tradeoffMSEshrinkage
  • Statistics & ExperimentsMediumModel answer
    Decompose Prediction Error into Bias and Variance

    Derive the bias-variance decomposition of MSE from first principles and apply it to diagnose a concrete model comparison scenario.

    Statistics & Experimentsstatisticsbias-variance tradeoffmodel evaluation
  • System DesignMediumModel answer
    Design a Game Distribution Platform with a Store, Library, and Downloads

    Design the core backend of a PC game platform: catalog browsing, purchasing, entitlement management, and large-file game delivery with delta updates.

    System Designcdncontent-deliveryentitlementsdistributed-systems
  • System DesignMediumModel answer
    Design a Low-Latency LLM Inference Gateway

    Design a production gateway that routes, batches, and serves LLM inference requests at scale with low latency and high throughput.

    System Designsystem designLLM servinginferencescalability
  • System DesignMediumModel answer
    Design a Multi-Channel Notification Delivery Service

    Design a scalable backend service that reliably delivers notifications across email, SMS, and push channels with rate limiting and user preferences.

    System Designsystem designnotificationsmessagingscalability
  • System DesignMediumModel answer
    Design a Versioned Document Storage and Search Service

    Design a system that stores versioned text documents and supports full-text search across any historical version at scale.

    System Designsystem designstorageindexingfull-text search
  • Machine LearningHardModel answer
    Design an Online Experiment for a Two-Stage ML Ranker

    Design an A/B test to evaluate a new learned second-stage ranker, covering metric choice, experiment validity, novelty effects, and post-experiment rollout decisions.

    Machine Learningmachine learningonline experimentsrankingA/B testing
  • Statistics & ExperimentsHardModel answer
    Design and Evaluate a Group Calling Feature End-to-End

    Given a single daily aggregate call table, infer latent demand, design a clustered A/B test, and build a long-term success framework for a Group Call feature.

    Statistics & Experimentsexperimentationproduct-analyticscausal-inferencemetric-design
  • System DesignHardModel answer
    Design Full-Text and Proximity Search for a Social Feed

    Design a system that indexes hundreds of millions of short posts for keyword search and geolocation queries, meeting tight freshness and latency targets at scale.

    System Designsearchgeolocationdistributed-systems
  • Trees & GraphsMediumAuto-graded
    Detect Circular Dependencies in a Build System

    Tests cycle detection in a directed graph by determining which packages in a build dependency graph are part of a circular dependency chain.

    Trees & Graphsgraphscycle detectionDFStopological sort
  • Statistics & ExperimentsMediumModel answer
    Diagnose a Disease Given a Positive Screening Test

    Apply Bayes' theorem to find the probability a patient truly has a disease after testing positive, interpreting the surprising result.

    Statistics & Experimentsconditional probabilityBayes theoremstatisticsprobability
  • Statistics & ExperimentsMediumModel answer
    Diagnose the Bias–Variance Source in a Noisy Experiment

    Given a model's train/validation/test error profile and experimental setup, identify whether bias or variance dominates and prescribe the right fix.

    Statistics & Experimentsbias-variance tradeoffmodel evaluationoverfittingstatistics
  • Machine LearningHardModel answer
    End-to-End Molecular Pair Regression System Design

    Design a complete ML pipeline to predict a real-valued interaction score for pairs of molecules, covering data quality, featurization, splitting, modeling, evaluation, and deployment.

    Machine Learningml-system-designcheminformaticsregressiongraph-neural-networks
  • Stacks & QueuesEasyAuto-graded
    Evaluate Simple Arithmetic String Expressions

    Tests ability to evaluate a string expression containing non-negative integers, +, -, *, / operators, and parentheses using a stack-based approach.

    Stacks & Queuesstacksexpression evaluationparsing
  • Dynamic ProgrammingHardAuto-graded
    Find Minimum Cost to Multiply a Chain of Matrices

    Tests dynamic programming on interval optimization, optimal substructure, and avoiding greedy pitfalls in matrix multiplication ordering.

    Dynamic Programmingdynamic-programmingoptimizationrecursion
  • Linked ListsMediumAuto-graded
    Find the Duplicate and Cycle Length in a Functional Graph

    Tests cycle detection on an index-as-next-pointer array to find the single duplicate value and the length of the cycle it creates.

    Linked Listslinked listscycle detectionFloyd's algorithm
  • Arrays & HashingEasyAuto-graded
    Find the First Character Appearing Exactly Once

    Tests the ability to use hash counting (frequency maps) to efficiently locate the first character in a string that appears exactly once.

    Arrays & Hashingarrays & hashinghash countingstrings
  • Arrays & HashingEasyAuto-graded
    Find the Most Frequent Character Difference

    Tests whether a candidate can use hash counting to find the pair of distinct characters whose absolute frequency difference is largest in a given string.

    Arrays & Hashingarrays & hashinghash countingstrings
  • System DesignMediumModel answer
    Hardware Metrics Pipeline: Ingest, Store, and Query at Scale

    Design an end-to-end telemetry platform that collects per-device metrics at two resolutions, serves trend dashboards, supports raw drilldowns, and safely exposes a natural-language query interface.

    System Designtime-seriesobservabilitydata-pipeline
  • Statistics & ExperimentsHardModel answer
    Instrument, Define, and Validate Metrics for a New Feature

    Design a measurement framework for a new product feature: pick a north-star and guardrails, plan instrumentation, derive KPIs from raw logs, and validate everything before stakeholders act on it.

    Statistics & Experimentsmetricsexperimentationinstrumentationdata-quality
  • Linked ListsMediumAuto-graded
    Interleave Two Halves of a Linked List (Array Form)

    Tests pointer-manipulation thinking by reordering a node list so that the first half and reversed second half are interleaved, all represented as arrays of values.

    Linked Listslinked listtwo pointersarray manipulation
  • Statistics & ExperimentsEasyModel answer
    Interpret a 95% CI from an A/B Test Result

    Given a reported confidence interval from a conversion-rate experiment, reason through what it does and does not tell you.

    Statistics & Experimentsstatisticsconfidence intervalsA/B testinghypothesis testing