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 991–1020 of 3794 results

  • Statistics & ExperimentsMediumModel answer
    Investigating a Sudden Fall in Courier Offer Acceptance

    Diagnose a nationwide drop in courier offer acceptance: audit the data, split mix from rate effects, assess marketplace fallout, and design a spillover-safe experiment.

    Statistics & Experimentsroot-cause-analysismetric-decompositionswitchback-experimentmarketplace
  • System DesignMediumModel answer
    Designing a Polite, Scalable Web Crawler at Production Scale

    Design a distributed crawler that fetches pages quickly across many hosts while never overloading any single upstream, with safe retries, deduplication, fairness and monitoring.

    System Designsystem-designrate-limitingweb-crawlerdistributed-systems
  • System DesignMediumModel answer
    Scaling a Solved Algorithm When the Data Outgrows Memory

    Explain how to adapt a working in-memory solution when the input becomes far too large, moving from constraints to streaming, external sorting, approximation or distribution.

    System Designscalabilitystreamingexternal-sortfollow-up-questions
  • Statistics & ExperimentsEasyModel answer
    Fixed vs Variable Costs in a Streaming Subscription Business

    Classify costs as fixed or variable for a subscription video service, resolve a mixed item such as cloud spend, and explain the effect on margin, break-even and CAC payback.

    Statistics & Experimentsunit-economicscontribution-marginbreak-evencac-payback
  • Machine LearningHardModel answer
    Ranking Currently-Live Channels Under a 100 ms Budget

    Design an end-to-end ML system that ranks live channels for viewers, covering labels, features, models, bias correction, evaluation, and low-latency serving as streams start and end.

    Machine Learningrecommender-systemstwo-towercounterfactual-learningexploration
  • System DesignMediumModel answer
    Resumable Large-File Transfer Service with Verified Chunks

    Design a storage-backed service that moves very large files in resumable pieces, checks integrity end to end, serves byte ranges, and only exposes files once fully committed.

    System Designsystem-designresumable-uploadobject-storageidempotency
  • Data Structure DesignMediumModel answer
    Const Pointer Variants and Choosing Between Tree and Hash Maps in C++

    Explain how const placement changes pointer and pointee mutability in C++, then compare std::map and std::unordered_map on structure, complexity, ordering, key needs and use cases.

    Data Structure Designcppconst-correctnesspointersstd-map
  • BehavioralMediumModel answer
    Navigating a High-Stakes Disagreement With a Peer or Lead

    Tell a story about a meaningful professional disagreement, showing how you surfaced assumptions, reached a decision respectfully, owned the outcome, and followed through.

    Behavioralbehavioralconflict-resolutioncommunicationownership
  • Data Structure DesignHardModel answer
    Build a Jungle Board Game Engine with Class Hierarchies

    Design the classes for a two-player Jungle (Dou Shou Qi) engine: eight animals, a 9x7 board with water, traps and dens, capture and jump rules, a small API, and tests.

    Data Structure Designobject-oriented-designgame-enginepolymorphismclass-design
  • Data Structure DesignMediumModel answer
    Build a Keyed Task Dispatcher with Global Concurrency Cap

    Design a component that runs tasks in strict order per key, lets different keys run in parallel up to a global limit, and stays correct under concurrent submits and task failures.

    Data Structure Designconcurrencythread-safetyexecutorqueues
  • Machine LearningEasyModel answer
    Selecting Classification Thresholds and Evaluating ML Pipelines

    Learn how to select decision thresholds, tune trade-offs under constraints like asymmetric costs and capacity, and design robust evaluation metrics for classification systems.

    Machine Learningclassificationthreshold-tuningmodel-evaluationprecision-recall
  • System DesignMediumModel answer
    Design a Real-Time Chess Platform with Integrated Chat

    Architect a scalable, low-latency distributed system for real-time multiplayer chess, clock management, and channel-based chat supporting peak loads.

    System Designsystem-designwebsocketsreal-timedistributed-systems
  • Dynamic ProgrammingMediumModel answer
    0/1 to Bounded Knapsack Optimization and Traceback

    Solve the 0/1 knapsack problem with optimal item selection, optimize its space complexity, and extend the solution to bounded knapsacks efficiently.

    Dynamic Programmingdynamic-programmingarrayssliding-windowknapsack
  • System DesignMediumModel answer
    Operating Production Infrastructure and Managing Outages

    A guide on managing production servers, diagnosing performance degradation, conducting structured incident response, and using Linux inspection utilities.

    System Designsreobservabilitylinuxincident-response
  • Statistics & ExperimentsEasyModel answer
    Product Success Measurement and Causal Evaluation Framework

    Learn how to establish a quantitative framework to evaluate product success, balancing primary metrics, funnels, guardrails, and causal inference methods.

    Statistics & ExperimentsA/B TestingExperimentationProduct AnalyticsCausal Inference
  • BehavioralMediumModel answer
    Evaluating Rejection Cooldowns and Structuring Short Onsite Loops

    Learn how to interpret interview cooldown periods, elicit actionable recruiter feedback, and execute high-signal answers during tight behavioral and low-level design onsite loops.

    BehavioralInterview StrategyLow Level DesignBehavioralCareer Strategy
  • Trees & GraphsHardModel answer
    Evaluate Chained Sum Definitions with Error Detection

    Compute the integer value of every variable defined as a sum of literals and other variables, raising distinct errors for duplicate, undefined, or circular definitions.

    Trees & Graphstopological-sortgraphkahn-algorithmcycle-detection
  • BehavioralHardModel answer
    Describe Past Engineering Roles and Career Progression

    Articulate your current and former engineering responsibilities, ownership scope, and technical evolution across roles during an initial screen.

    Behavioralbehavioralcareer-progressionrecruiter-screeninterview-preparation
  • Machine LearningHardModel answer
    Designing Alignment & Safeguards Against AI Sycophancy and Over-Reliance

    Analyze sycophancy and emotional over-dependence in conversational LLMs, detailing root causes, evaluation metrics, algorithmic mitigations, and agency-preserving product controls.

    Machine Learningmachine-learningai safetyrlhfllm alignment
  • Math & Bit ManipulationMediumModel answer
    Spot Hidden Differences Between Two Array Routines

    Decide whether two array-processing routines behave identically under 32-bit integer rules, find a smallest counterexample if not, and design tests that expose subtle divergences.

    Math & Bit Manipulationprogram-equivalenceinteger-overflowproperty-based-testingdifferential-testing
  • Statistics & ExperimentsMediumModel answer
    Building a Cost-Aware Objective for a One-Period Stat-Arb Portfolio

    Augment a mean-variance stat-arb objective with realistic trading and holding costs, make units consistent, avoid double counting, calibrate from data, and check convexity.

    Statistics & Experimentsportfolio-optimizationtransaction-costsmarket-impactconvex-optimization
  • Statistics & ExperimentsMediumModel answer
    Evaluating an In-App Store Ad Ranking Shift

    Design an experimentation and evaluation framework to test upranking native checkout ads over external link ads, handling marketplace interference and heterogenous segment impacts.

    Statistics & ExperimentsA/B TestingExperiment DesignMarketplace InterferenceHeterogeneous Effects
  • Data Structure DesignMediumModel answer
    Random Equipment Lending Pool with Constant-Time Operations

    Build an in-memory pool that lends out a uniformly random free item to a borrower, accepts returns, and allows retirement of idle items, with every operation in O(1) average time.

    Data Structure Designhash-maprandomizedswap-and-popinsert-delete-getrandom
  • Heaps, Sorting & SearchMediumModel answer
    Random Index Selection by Given Weights

    Design an index sampler where each element's probability of being chosen is proportional to its assigned weight.

    Heaps, Sorting & Searchprefix-sumbinary-searchrandomizationdata-structure-design
  • Math & Bit ManipulationEasyModel answer
    Two Islanders, One Accusation: Which Role Pairs Work?

    One islander accuses the other of always lying. Test all four role pairings and decide which ones are logically possible.

    Math & Bit Manipulationlogicpuzzlecase-analysisknights-and-knaves
  • Arrays & HashingMediumModel answer
    Best Single Trade Within a Limited Holding Period

    Find the most profitable buy-then-sell pair in a price array when the sale must happen within D days of the purchase, in O(n) time and O(1) extra space.

    Arrays & Hashingsliding-windowblock-decompositionmonotonic-dequestock-trading
  • Trees & GraphsMediumModel answer
    Repairing a Search Tree After One Pair of Keys Trades Places

    Two keys in a binary search tree were exchanged by mistake. Restore ordering by swapping values back, keeping the shape intact, in linear time and constant extra space.

    Trees & Graphsbinary-search-treemorris-traversalin-ordertree-recovery
  • BehavioralMediumModel answer
    Balancing Product, Design, and Engineering Demands on a Deadline

    A behavioral prompt on resolving clashing goals across product, design, and engineering, making a costly trade-off under time pressure, and describing your working style and personal motivations.

    Behavioralbehavioralcross-functionaltrade-offsstar-method
  • Machine LearningHardModel answer
    Optimize Perishable Food Stocking Under Asymmetrical Failure Costs

    Design an end-to-end ML and inventory system to predict demand distributions and output cost-optimal daily stocking levels under asymmetric waste and stockout penalties.

    Machine Learningmachine-learningdemand-forecastingprobabilistic-modelingnewsvendor-problem
  • BehavioralHardModel answer
    Behavioral Loop: Disagreement, Failure, and Project Ownership

    Tell three structured stories: a substantive disagreement you resolved, a serious mistake you owned and fixed systemically, and a project you led, defended in technical depth.

    Behavioralbehavioralleadershipconflict-resolutionpostmortem