KatInterview

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

Interview Practice Problems

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

6025
Problems
2231
Auto-graded
15
Topics
273
Added today

Showing 2821–2850 of 3794 results

  • System DesignHardModel answer
    Design a Multi-Source Data Reconciliation Pipeline

    Design and implement a pipeline that merges messy person records from several sources into canonical entries, handling normalization, matching, conflict resolution, and validation.

    System Designentity-resolutiondata-qualityrecord-linkagepipeline-design
  • System DesignMediumModel answer
    Design a Durable Multi-Threaded Append-Only Log Writer

    Design a thread-safe writer that lets thousands of threads durably append sub-1KB opaque records to one local file, with crash-safe framing and safe error handling.

    System Designconcurrencydurabilityfile-iobatching
  • BehavioralMediumModel answer
    Career Narrative, Ownership, Ambiguity, and Engineering Trade-offs

    Four behavioral prompts covering your motivation to change roles, a project you owned, handling unclear requirements, and a real engineering trade-off.

    Behavioralbehavioralleadershipsystem-designengineering-judgment
  • Machine LearningMediumModel answer
    Add Positional Encoding to a Transformer Language Model

    Implement sinusoidal or learned positional encodings in PyTorch, explain the math and tensor shapes, integrate them into a Transformer LM, and diagnose what breaks without them.

    Machine Learningtransformerspositional-encodingpytorchlanguage-models
  • Data Structure DesignHardModel answer
    Ride-Share Wallet: Credit Vouchers, Zone Surcharges, and Refunds

    Simulate a ride-share payment ledger that drains expiring vouchers in priority order, applies zone-based surcharges to card charges, and splits refunds between card and new store credit.

    Data Structure Designsimulationpriority-queueinteger-mathstate-machine
  • Machine LearningHardModel answer
    Model Optimization and Distributed Training Parallelism Strategies

    Explain key techniques for reducing training and inference cost, then compare how tensor parallelism and pipeline parallelism split work across GPUs.

    Machine Learningdeep-learningdistributed-traininginference-optimizationLLMs
  • BehavioralMediumModel answer
    Turning Uncomfortable Feedback Into a Measurable Change

    Walk through a time you received feedback you initially pushed back on, how you investigated it objectively, and what concrete habit you built from it.

    Behavioralgrowth mindsetself-awarenessfeedbackSTAR method
  • Statistics & ExperimentsHardModel answer
    End-to-End A/B Test Design for a Credit Card Launch

    Design a rigorous A/B test for a new credit card offer, covering randomization, metrics, sample size, bias, interference, and regulatory constraints.

    Statistics & Experimentsexperimentationcausal-inferencepower-analysisfinancial-products
  • System DesignMediumModel answer
    Unified Login Across Independently Hosted Domains Using OIDC

    Design a shared identity layer that lets users sign in once and move freely between two separate domains, then scale the same pattern to many sites and delegated API access.

    System Designauthenticationoauthoidcsso
  • System DesignHardModel answer
    Configurable N×N Tic-Tac-Toe in React with O(N) Win Detection

    Build a two-player, grid-size-configurable Tic-Tac-Toe React component with efficient win detection, prop reactivity, and full keyboard/screen-reader accessibility.

    System Designreacttypescriptaccessibilitystate-management
  • BehavioralMediumModel answer
    Secure Password Verification in Express Without Blocking

    Fix a Node.js authentication endpoint: validate input, compare passwords asynchronously, return safe errors, and prevent event-loop blocking.

    Behavioralnode.jsexpresssecurityasync
  • System DesignMediumModel answer
    Single-Elevator Control Policy for a Four-Stop Building

    Design the scheduling logic for one elevator serving a basement plus three floors, covering objectives, state, dispatch strategy, data structures, and simulation.

    System Designelevatorschedulingstate-machinesimulation
  • Statistics & ExperimentsMediumModel answer
    Design an Experiment for Interest-Based Friend Recommendations

    Design a randomized experiment to measure whether recommending connections based on predicted interest improves discovery and retention.

    Statistics & Experimentsexperimentationcausal-inferenceproduct-metricsa-b-testing
  • System DesignHardModel answer
    Shared Account Balance API: Preventing Double-Spend at Scale

    Design an API for a shared payment account that keeps the balance consistent when multiple users submit payments simultaneously, at high throughput.

    System Designconcurrencypaymentsdistributed-systemsidempotency
  • BehavioralEasyModel answer
    Adapt to teammates and give feedback that sticks

    Demonstrate collaboration, style flexibility, constructive feedback, and documentation ownership through concrete stories from your past work.

    Behavioralcollaborationfeedbackdocumentationinclusion
  • System DesignMediumModel answer
    Build a Fault-Tolerant Payment Execution Engine

    Implement a payout processor that guarantees exactly-once delivery against an unreliable ledger by persisting state and resolving ambiguous responses before retrying.

    System Designidempotencyfault-tolerancedistributed-systemsstate-machines
  • System DesignHardModel answer
    Build an in-memory rate limiter using token buckets

    Design a fast, memory-efficient rate limiter for an API that tracks per-client quotas using a token-bucket algorithm with lazy refill.

    System Designrate-limitingscalabilityalgorithmsconcurrency
  • Statistics & ExperimentsMediumModel answer
    Measuring Treatment Effect from Experiment and Event Data

    Define a user-level outcome from experiment assignment and event logs, then estimate the average treatment effect with a confidence interval.

    Statistics & Experimentsexperimentationcausal-inferenceconfidence-intervals
  • Machine LearningMediumModel answer
    Validating a Probability of Default Model End to End

    Walk through every stage of PD model validation — data checks, discrimination, calibration, stability, and backtesting — explaining the key metrics and their limitations.

    Machine Learningcredit-riskmodel-validationclassification
  • System DesignMediumModel answer
    Build a Reference-Counted Smart Pointer in C++

    Design a shared-ownership pointer class: explain the control block, copy/move semantics, destruction invariants, and the boundaries of reference counting.

    System Designc++memory-managementsmart-pointersownership
  • Data Structure DesignMediumModel answer
    Event-Driven Email Notification System with Account Updates

    Build a scheduler that emits subscription notifications in time order, handling plan switches and subscription extensions with deterministic tie-breaking.

    Data Structure Designheapssimulationevent-drivenscheduling
  • System DesignHardModel answer
    Design a Resumable, Token-Secured File Transfer Platform

    Design a high-throughput file transfer service that handles multi-gigabyte uploads and downloads with scoped token auth, revocation, chunk integrity, and bounded proxy memory.

    System Designdistributed-systemssecuritystorageapi-design
  • System DesignMediumModel answer
    Design a Concert & Event Ticket Sales Platform

    Design a seat reservation system for high-demand events, covering inventory consistency, surge traffic, payment edge cases, and failure recovery.

    System Designsystem-designdistributed-systemsconsistencyqueuing
  • Data Structure DesignMediumModel answer
    Design a Lazy Iterator Pipeline with Range and Combinators

    Build a pull-based iterator for ranges with configurable steps and endpoints, plus composable transformations like map, filter, zip, take, drop, and chain.

    Data Structure Designiteratorslazy-evaluationfunctional-programming
  • Statistics & ExperimentsMediumModel answer
    Modeling Joint Tail Risk and Classic Probability Puzzles

    Build a copula-based stress framework for correlated commodities, compute variance formulas for sums, analyze the door-switching paradox, and solve the weighted-ball identification puzzle.

    Statistics & Experimentsprobabilityrisk-modelingcopulasbrain-teasers
  • Statistics & ExperimentsMediumModel answer
    Causal Inference Without Experiments + Three-Arm Conversion Test

    Design a quasi-experimental causal study, analyze a three-variant CTP experiment by hand, layer in business guardrails, and forecast post-launch performance with uncertainty.

    Statistics & Experimentscausal-inferencea/b-testingconfidence-intervalsexperimentation
  • Statistics & ExperimentsMediumModel answer
    Plant-Based Menu Addition: Financial Viability and Pilot Strategy

    Evaluate whether a restaurant chain should add a plant-based burger by analyzing unit economics, cannibalization effects, and designing an experiment to test the decision.

    Statistics & Experimentsbusiness-metricsexperimentationprofitabilityproduct-launch
  • System DesignMediumModel answer
    Build and Scale a Freight Quote Service with Slow Dependencies

    Implement service logic for a freight pricing API, then architect for high traffic when external services are slow.

    System DesignAPI designdistributed systemscachingreliability
  • Data Structure DesignHardModel answer
    Build a Concurrent Multi-Constraint Rate Limiter

    Design a thread-safe class that enforces several independent rate limits simultaneously, with atomic all-or-nothing permit acquisition and rollback on failure.

    Data Structure Designconcurrencyrate-limitingsliding-windowatomicity
  • Data Structure DesignMediumModel answer
    Async URL Batch Fetcher with Concurrency Limits

    Build an async function that fetches a list of URLs with bounded parallelism, deduplicates identical URLs, preserves input order, and isolates per-URL errors.

    Data Structure Designasyncconcurrencypythondeduplication