KatInterview

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

Interview Practice Problems

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

6074
Problems
2252
Auto-graded
15
Topics
275
Added today

Showing 4201–4230 of 6074 results

  • Arrays & HashingMediumAuto-graded
    Grid Sentinels: Match Robots by Barrier Distance Profile

    Tests efficient 2-D prefix sweeps to compute each robot's nearest-wall distance in four directions and filter by an exact profile query.

    Arrays & Hashingmatrixprefix-scansimulation
  • Greedy & IntervalsMediumModel answer
    First Open Meeting Window Across All Employees

    Sweep merged busy intervals to find the earliest gap of a required duration that fits within every employee's working hours.

    Greedy & Intervalsintervalsheapmergescheduling
  • Machine LearningMediumModel answer
    Fraud Scorer: Picking a Decision Threshold with Asymmetric Costs

    Select and justify an operating threshold for a fraud probability scorer given asymmetric FP/FN costs, then cover calibration, drift monitoring, and safe rollout.

    Machine Learningcost-sensitive learningthreshold selectioncalibrationdrift monitoring
  • Arrays & HashingMediumAuto-graded
    Find Most Common Elements Without Built-in Max

    Tests manual maximum-finding across a frequency dictionary, tie-breaking by first occurrence, and working with stringified keys.

    Arrays & Hashinghash-mapfrequency-countingiteration
  • Data Structure DesignHardAuto-graded
    Exact-Phrase Lookup Across a Document Collection

    Tests building a positional inverted index so that multi-word phrases can be found by exact word sequence across many documents with repeated queries handled efficiently.

    Data Structure Designinverted-indexstring-searchhashing
  • System DesignHardModel answer
    Design a Video Ad Insertion Platform for Streaming

    Design a low-latency, fault-tolerant ad-insertion system for a live and on-demand video platform, covering decisioning, delivery, pacing, and measurement at scale.

    System Designadsreal-time-biddingstreamingcdn
  • BehavioralMediumModel answer
    Describing Your Most Impactful Engineering Project

    Explain a technical project you're proud of, your role, key decisions, trade-offs, and outcomes—preparing for follow-up questions on challenges and lessons.

    Behavioralbehavioralleadershipexperiencecommunication
  • SQL & DataMediumModel answer
    Window Ranking Functions: Choosing the Right One for Top-N Queries

    Explain how ROW_NUMBER, RANK, and DENSE_RANK behave differently when ties exist, and which to use depending on what "top N" actually means.

    SQL & Datawindow-functionsrankingtiestop-k
  • BehavioralHardModel answer
    Championing a Foundation-Model Initiative in a Safety-Critical Org

    Explain how you would frame, evidence, and pitch a proposal to integrate vision-language models into an autonomous system program and earn real resources.

    Behavioralleadershipstakeholder-alignmentml-strategyautonomous-systems
  • Machine LearningHardModel answer
    Design a Hybrid Model Evaluation System with Human Review

    Design a scalable evaluation platform that combines automated metrics, LLM-based judging, and human expert review to assess ML model outputs with full provenance tracking.

    Machine Learningsystem-designmlopshuman-in-the-loopevaluation
  • Dynamic ProgrammingHardAuto-graded
    Build Arithmetic Expressions That Hit a Target Value

    Tests backtracking with incremental precedence-aware evaluation to enumerate all +/* expressions over a number sequence that sum to a given target.

    Dynamic Programmingbacktrackingrecursionoperator-precedence
  • Statistics & ExperimentsMediumModel answer
    Root-causing a conversion drop after a forced app rollout

    Diagnose a 50-basis-point signup conversion decline following a mandatory mobile app update with no A/B control group available.

    Statistics & Experimentsquasi-experimentscausal-inferencemetric-decompositiondecision-making
  • Data Structure DesignMediumModel answer
    Build a Bounded In-Memory File System with Auto-Rename

    Design a trie-backed file system supporting path-based file insertion and directory listing, with a per-directory capacity cap and OS-style duplicate renaming.

    Data Structure Designtriehash-mapfile-systemOOP
  • Machine LearningMediumModel answer
    Predictive Modeling for Wine Ratings from Chemical Properties

    Build and validate a model that predicts wine ratings from chemical measurements, choosing appropriate problem framing, metrics, and feature analysis methods.

    Machine Learningsupervised-learningfeature-engineeringmodel-evaluationordinal-prediction
  • Machine LearningHardModel answer
    Route Each Order to One of Two Suppliers to Minimize Cost

    Design a constrained decision model that selects a supplier per order to minimize expected total cost while keeping SLA attainment at or above 95% and staying within a monthly budget.

    Machine Learningcost-sensitive learningcausal inferenceconstrained optimizationoff-policy evaluation
  • Statistics & ExperimentsMediumModel answer
    Defining Success Metrics and Running Product Experiments

    Define a primary success metric for a consumer or enterprise product, identify supporting indicators, and design a rigorous experiment to move that metric.

    Statistics & Experimentsmetricsexperimentationproduct-analyticscausal-inference
  • System DesignHardModel answer
    Design a Real-Time Click Counter and a Cross-Device File Sync Service

    Design two systems: a high-throughput ad click aggregator with idempotent deduplication, and a Dropbox-style file sync service with delta uploads and conflict resolution.

    System Designstreamingkafkaflinkfile-storage
  • Data Structure DesignMediumModel answer
    Build an Expiry-Aware LRU Cache Without Scanning Every Key

    Design an in-memory cache that enforces capacity with LRU eviction and per-entry TTL, keeping expiration efficient without iterating all keys.

    Data Structure Designcachelruttlconcurrency
  • Data Structure DesignMediumModel answer
    Order Book Simulator with Fair Volume Participation

    Build a limit order matching engine, then add participation-rate execution logic for one client, and finally extend to multiple clients with fair allocation.

    Data Structure Designorder-bookpriority-queuesimulationgreedy
  • Statistics & ExperimentsMediumModel answer
    Experimentation Fundamentals: Statistical Testing and Causal Methods

    Demonstrate your understanding of controlled experiments, error types, metrics design, confounding, and causal inference techniques for product analytics.

    Statistics & Experimentsa-b-testingcausal-inferencestatisticsexperimentation
  • Trees & GraphsMediumAuto-graded
    Shortest Path from Multiple Sources in a Grid

    Tests understanding of multi-source BFS to efficiently compute shortest distances from any of several starting points to many query locations.

    Trees & Graphsbfsgraph-traversalshortest-pathgrid
  • Statistics & ExperimentsEasyModel answer
    Fermi Estimation: How Many Cars Does Annual US Spotify Spending Buy?

    Decompose a large-scale spending estimate into bounded factors, produce a calibrated 90% confidence interval, and update it when one input is revealed.

    Statistics & Experimentsfermi-estimationconfidence-intervalsuncertainty-quantification
  • BehavioralHardModel answer
    Pitch Yourself, Then Prove It With an Experiment

    Deliver a tight personal pitch, then walk through an A/B test end-to-end: design, execution, results, and the causal reasoning behind them.

    Behavioralexperimentationcommunicationcausal inferenceproduct sense
  • Machine LearningHardModel answer
    Design an Agentic Customer Support Automation System

    Design an end-to-end AI system that scrapes tickets from a browser-only UI, enriches them with user data from an API, and generates personalized support replies.

    Machine Learningagentic-aibrowser-automationllmsystem-design
  • StringsMediumModel answer
    Extract and Safely Parse an XML Document Nested in CDATA

    Implement a function that pulls a nested XML document out of a CDATA section and reads an attribute from its root, while blocking XXE and entity-expansion attacks.

    Stringsxmlsecurityparsing
  • System DesignHardModel answer
    Design a Crash Artifact Ingestion and Triage Pipeline

    Design a distributed system that collects, deduplicates, stores, and analyzes large binary crash files from a massive microservice fleet across regions.

    System Designdistributed-systemsstoragereliabilityscalability
  • Data Structure DesignMediumAuto-graded
    Hash-Tree Diff: Detect File Changes Between Two Snapshots

    Tests ability to build a bottom-up Merkle hash tree from file path/content mappings and use subtree hash pruning to efficiently classify added, modified, and deleted files.

    Data Structure Designhashingtrees-graphsrecursion
  • Trees & GraphsMediumAuto-graded
    Spot the VIP in a Social Network

    Tests whether a candidate can exploit a single elimination insight to find a universal acquaintance in O(n) time instead of O(n²).

    Trees & Graphsgraphseliminationtwo-pass
  • Arrays & HashingEasyAuto-graded
    Random Assignment Statistics with Replacement

    Compute expected allocation count, reachability probability, and expected coverage when distributing items randomly with replacement.

    Arrays & Hashingprobabilityexpectationbinomialcomplement-rule
  • BehavioralEasyModel answer
    Navigating a Challenging Technical Project

    Explain a complex project you led, the obstacles you faced, your decision-making process, and the measurable outcome.

    Behavioralbehavioralleadershipproblem-solving