KatInterview

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

Interview Practice Problems

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

6008
Problems
2226
Auto-graded
15
Topics
273
Added today

Showing 3091–3120 of 3782 results

  • Data Structure DesignHardModel answer
    In-Memory Transaction Ledger with Aliases and History

    Implement a timestamped in-memory ledger supporting deposits, cashback transfers, scheduled execution, account merging with alias resolution, and point-in-time balance queries.

    Data Structure Designunion-findheapbinary-searchsimulation
  • Statistics & ExperimentsMediumModel answer
    Metrics for Fraud Detection System Evaluation

    Design monitoring metrics to evaluate a system detecting fake engagement, distinguish organic virality from coordinated manipulation, and validate true performance improvements.

    Statistics & Experimentsmetricsfraud-detectionexperimentationprecision-recall
  • System DesignMediumModel answer
    React Community Board: Voting, Re-Ranking, and Sticky Posts

    Build a React feed where upvotes and downvotes re-sort posts by score and designated sticky posts always stay above the ranked list.

    System Designreactstate-managementaccessibilityoptimistic-updates
  • Machine LearningMediumModel answer
    Build a Document QA System with Grounded LLM Responses

    Design an end-to-end system that answers user questions by retrieving relevant passages from a large corpus and generating responses with citations.

    Machine Learningraginformation-retrievalllmproduction-ml
  • BehavioralMediumModel answer
    Walk Me Through Your Most Impactful Technical Project

    Describe a project where your decisions drove measurable outcomes, covering problem context, ownership, tradeoffs, results, and what you'd do differently.

    Behavioralownershipimpacttradeoffsleadership
  • Machine LearningEasyModel answer
    Optimization Dynamics: Learning Rates and Gradient Flow

    Explain how learning rate magnitude affects training stability and why gradient attenuation disproportionately impacts early layers in deep networks.

    Machine Learningoptimizationgradientsdeep-learning
  • Statistics & ExperimentsMediumModel answer
    Understanding P-Values and Bootstrap Sampling Distributions

    Discuss why regression software displays p = 0.000, how to report it correctly, and how bootstrap resampling estimates coefficient uncertainty.

    Statistics & Experimentsstatistical-inferencehypothesis-testingbootstrappingregression
  • Machine LearningHardModel answer
    Mitigating Reward Model Exploitation in RLHF

    Design detection systems and training safeguards to prevent language models from gaming reward functions during reinforcement learning optimization.

    Machine Learningreinforcement-learningrlhfreward-modelingpolicy-optimization
  • Data Structure DesignMediumModel answer
    Constant-Time Range Queries and Stack with Maximum Tracking

    Implement two data structures: one supporting fast interval sum queries on a fixed array, and a stack that efficiently tracks and removes its maximum element.

    Data Structure Designprefix-sumstackheapdata-structures
  • System DesignHardModel answer
    Storage System for Compiled Build Outputs

    Design a scalable distributed storage service that handles immutable binary files produced by continuous integration pipelines.

    System Designdistributed-systemsstoragescalabilityconsistency
  • Statistics & ExperimentsMediumModel answer
    Why Does the Standardized Sample Mean Converge to Normal?

    Explain what quantity becomes approximately normal as sample size grows, the theorem that guarantees it, why it holds, and when it breaks down.

    Statistics & Experimentscentral-limit-theoremstatistical-inferenceasymptotic-theory
  • System DesignMediumModel answer
    Threads vs Processes in Python: Concurrency Trade-offs

    Compare thread-based and process-based concurrency in Python, covering the GIL, memory isolation, and which model fits I/O-bound vs CPU-bound workloads.

    System Designconcurrencypythongilmultiprocessing
  • Data Structure DesignMediumModel answer
    Maintaining a Random Sample from a Stream of Unknown Length

    Implement a data structure that keeps k randomly chosen items from a stream where you don't know the total count ahead of time.

    Data Structure Designreservoir-samplingstreaming-algorithmsrandomized-algorithms
  • SQL & DataMediumModel answer
    Build a Region-Level Revenue Summary with Pandas

    Merge two DataFrames on a shared key, then aggregate transaction amounts by region to produce a sorted summary of total and average spend.

    SQL & Datapandasgroupbymergeaggregation
  • System DesignHardModel answer
    Design a Distributed Financial Ledger System

    Build a strongly consistent, double-entry ledger handling concurrent writes, balance queries, and audit trails at scale.

    System Designdistributed-systemsconsistencytransactionsfinancial-systems
  • Machine LearningMediumModel answer
    LLM Architecture: Evolution, Multimodal Fusion, and Normalization

    Explain generational advances in LLM families, how vision-language models integrate images, and why transformers use layer norm with pre-norm placement.

    Machine Learningllmtransformersmultimodalnormalization
  • Arrays & HashingMediumModel answer
    Proportional Stratified Sampling with Largest Remainder Allocation

    Sample records from grouped data while preserving stratum proportions, using the largest remainder method to allocate exact counts and seeded random selection.

    Arrays & Hashingsamplinggroupinghash-tablerandomization
  • System DesignHardModel answer
    Build a Global Marketplace Pricing System for Multiple Currencies

    Design the full stack — data model, APIs, exchange-rate pipeline, rounding, and UX — for a travel marketplace that lets guests browse and pay in any of ~50 currencies.

    System Designcurrencypaymentsdistributed-systemsdata-modeling
  • Statistics & ExperimentsHardModel answer
    Concurrent A/B Test Design with Interaction Effects

    Design and analyze experiments for two product changes launching simultaneously, addressing interaction effects, power, and sequential monitoring.

    Statistics & Experimentsexperiment-designfactorial-designinteraction-effectspower-analysis
  • Statistics & ExperimentsMediumModel answer
    Project Selection with Resource Constraints and Quality Factors

    Choose between two fixed-price software projects, modeling costs, capacity, rework, and schedule risk to maximize profit.

    Statistics & Experimentsoptimizationcost-benefit-analysisrisk-analysis
  • Machine LearningMediumModel answer
    Build Linear Regression and MSE Loss Without Libraries

    Code mean squared error from scratch, then build a linear regression class with fit and predict methods using gradient descent.

    Machine Learninggradient-descentloss-functionsfrom-scratchnumerical-optimization
  • Statistics & ExperimentsMediumModel answer
    Regression Invariance Under Feature Transformations

    Show mathematically how ordinary least squares predictions behave when features are linearly transformed, and contrast with regularized methods.

    Statistics & Experimentslinear-regressionridge-regressionlassolinear-algebra
  • Statistics & ExperimentsMediumModel answer
    Designing an A/B Test for a Queue-Jumping Feature

    Design metrics and an experiment to evaluate a paid priority-matching feature in a two-sided marketplace where treatment and control groups share the same supply.

    Statistics & Experimentsexperimentationtwo-sided-marketplacespillover-effectsmetrics-design
  • Statistics & ExperimentsMediumModel answer
    Comparing Ad Distribution Models: Random vs. Deterministic Placement

    Analyze two ad-serving approaches for a content feed: probabilistic per-item insertion versus fixed-quota allocation.

    Statistics & Experimentsprobabilityvariancebinomial-distributionexpectation
  • System DesignHardModel answer
    Build a Distributed Pipeline Execution Engine

    Design a fault-tolerant scheduler that executes dependency graphs across a worker fleet with lease-based dispatch and deployment safety.

    System Designdistributed-systemsschedulingstate-machinesconcurrency
  • Trees & GraphsMediumModel answer
    Robot Grid Exploration with Limited Sensing API

    Navigate a robot through an unmapped grid with obstacles using only movement and turn commands to locate a target cell.

    Trees & Graphsdfsbacktrackinggraph-traversalsimulation
  • BehavioralHardModel answer
    Walk Through a Product You Owned End-to-End with Proof

    Pick one product or feature you drove from problem framing to launch and demonstrate ownership, metric rigor, risk management, and measurable impact.

    Behavioralproduct leadershipexperimentationimpact measurementprioritization
  • Trees & GraphsHardModel answer
    Shortest Path for a Hobbled Xiangqi Horse on a 10×9 Board

    Find the minimum moves for a Chinese-chess horse to reach a target on a 10×9 grid, accounting for the leg-blocking movement restriction and obstacle squares.

    Trees & GraphsBFSgraph traversalboard gamesshortest path
  • System DesignMediumModel answer
    Design an Asynchronous Job Service for Batch File Operations

    Design an HTTP API and backend system to process large batches of files asynchronously, handling long-running work, job tracking, and failures.

    System Designapi-designasync-jobsdistributed-systemsfault-tolerance
  • Machine LearningMediumModel answer
    Implement Mini-Batch Gradient Descent for Linear Regression

    Build mini-batch gradient descent from scratch using NumPy to train a linear regression model with MSE loss.

    Machine Learningoptimizationgradient-descentnumpylinear-regression