KatInterview

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

Interview Practice Problems

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

6013
Problems
2228
Auto-graded
15
Topics
276
Added today

Showing 751–780 of 6013 results

  • Trees & GraphsMediumAuto-graded
    Schedule Courses Under Prerequisite Rules

    Produce a deterministic course order that respects prerequisite pairs using a queue-based topological sort, or an empty list if the prerequisites contain a cycle.

    Trees & Graphstopological-sortgraphbfscycle-detection
  • StringsMediumModel answer
    Round a Decimal String Without Using Floats

    Round a decimal number given as a string to the nearest integer, then to its last significant digit, using digit-level arithmetic and carry handling instead of floating-point types.

    Stringsstringscarry-propagationroundingparsing
  • System DesignMediumModel answer
    Counting Nodes in a Distributed Tree Network

    Design a distributed algorithm and protocol to count all nodes in an N-ary tree using asynchronous message passing, local state, and deduplication.

    System Designdistributed-systemsconcurrencytrees-graphssystem-design
  • System DesignHardModel answer
    Serving a 70B LLM to Thousands of Concurrent Streaming Users

    Design a multi-GPU inference platform for a 70B model that streams tokens with low first-token latency, keeps GPUs busy, manages KV cache memory, and survives traffic spikes.

    System Designllm-servingcontinuous-batchingkv-cachepaged-attention
  • Data Structure DesignMediumAuto-graded
    Prioritized Delayed Job Queue Simulator

    Simulate a delayed job queue by replaying a log of schedule, reschedule, cancel and poll operations, returning each result in order while respecting priority and time ordering.

    Data Structure Designheaphash-mapsimulationlazy-deletion
  • System DesignMediumModel answer
    Live Bidding Engine: Ordering, Contention and Push Updates

    Design a live bidding service that handles bursts of bids on popular items, keeps a strict per-item order, never loses accepted bids, and streams the leading bid to viewers.

    System Designsystem-designreal-timeconcurrencyidempotency
  • System DesignHardModel answer
    Platform Engineering Deep Dive: IaC, K8s, Edge OTA, Routing

    Explain how you would automate bare-metal and Kubernetes delivery, run edge firmware rollouts, reason about IP routing, and describe a homelab that backs up your claims.

    System Designinfrastructure-as-codekubernetesgitopsfleet-management
  • Math & Bit ManipulationMediumAuto-graded
    Pair Growth by Adding One Coordinate to the Other

    Decide whether a positive integer pair can grow into a target pair by repeatedly adding one coordinate to the other, using reverse-step reasoning and Euclid-style reduction.

    Math & Bit Manipulationmatheuclidean-algorithmreverse-simulationnumber-theory
  • Data Structure DesignMediumAuto-graded
    Track and Analyze Obstacle Course Runs

    Simulate obstacle course data structures, track per-stage times, calculate target metrics, and run Monte Carlo probability estimation.

    Data Structure Designdesign-dsarraysstatistics
  • Statistics & ExperimentsMediumModel answer
    Defining and Testing Quality for a Mobile Alert System

    Choose metrics for judging alert quality, set a defensible bar for "good" alerts, and design a launch experiment for a new alert-selection algorithm in a consumer app.

    Statistics & Experimentsexperimentationmetric-designa/b-testingpower-analysis
  • Statistics & ExperimentsMediumModel answer
    A/B Testing a Single Changed Step in a Signup Walkthrough

    Design an experiment for one revised step in a new-user walkthrough: pick targeted metrics, choose the randomization unit, check group balance, and select tests and sample size.

    Statistics & Experimentsab-testingexperiment-designsample-sizerandomization
  • Arrays & HashingEasyAuto-graded
    95% Z-Interval for a Mean with Known Standard Deviation

    Compute a 95% z-based confidence interval for a population mean from a sample mean, known population standard deviation, and sample size, using the standard error.

    Arrays & Hashingconfidence-intervalcentral-limit-theoremstandard-errora-b-testing
  • Statistics & ExperimentsMediumModel answer
    Experiment Plan for a Recency-Boosted Search Ranker

    Plan a controlled experiment for a recency-weighted search ranker: hypotheses, success and guardrail metrics, randomization unit, and biases such as novelty and interference.

    Statistics & Experimentsab-testingexperiment-designsearch-rankingmetrics
  • Heaps, Sorting & SearchMediumAuto-graded
    Build a Max-Heap In Place with Bottom-Up Sifting

    Convert an integer list into a max-heap layout using the bottom-up sift-down procedure, matching an exact output array including tie-break behavior.

    Heaps, Sorting & Searchheaparraysift-downin-place
  • Data Structure DesignMediumModel answer
    Streaming Reader for a Page-Based Word Source

    Build a class that wraps a slow, paginated word API and serves exact word counts per call, keeping leftovers between calls and fetching pages lazily.

    Data Structure Designclass-designbufferingpaginationdeque
  • BehavioralMediumModel answer
    Pivoting Into Developer Tooling From a Product-Facing Career

    Practice answering a hiring manager who doubts your fit for an internal tooling team because you want large-scale backend work and have only built user-facing products.

    Behavioralbehavioralmotivationcareer-transitiondeveloper-productivity
  • Machine LearningHardModel answer
    Anatomy of a Tool-Using LLM Agent and Its Control Flow

    Describe the building blocks of a language-model agent, what each is responsible for, and how they cooperate across a multi-step task with safety and evaluation in mind.

    Machine Learningllm-agentstool-usememoryplanning
  • Arrays & HashingMediumAuto-graded
    Group Paths Whose File Contents Match Exactly

    Group file paths whose contents are identical, using cheap filters like size and digest, with an exact comparison to confirm. Output is sorted groups of two or more paths.

    Arrays & Hashinghashinggroupingstringssorting
  • SQL & DataMediumModel answer
    Rating Trends Across a Rider's First and Third Months by City

    Write a PostgreSQL query returning, per city, the mean per-ride rating in each rider's first and third months with rides, handling skipped months, unrated rides and weighting.

    SQL & Datasqlpostgresqlwindow-functionsdense-rank
  • Statistics & ExperimentsMediumModel answer
    Measuring the Engagement Payoff of a Faster Video Start

    Plan an experiment and analysis program for a roughly 100 ms start-time reduction that may raise errors and buffering, including ratio-metric diagnosis and a propensity-matching fallback.

    Statistics & Experimentsab-testingpower-analysiscupedguardrail-metrics
  • Greedy & IntervalsMediumAuto-graded
    Minimum Concurrent Resources for Overlapping Intervals

    Find the maximum number of overlapping intervals at any instant using sweep line or heap techniques.

    Greedy & Intervalsintervalssweep-lineheapsorting
  • BehavioralEasyModel answer
    Walk Through a High-Stakes Project and Its Lessons Learned

    A behavioral prompt for senior data scientists: describe a tough project you drove to measurable business impact, then reflect on one decision you would change.

    Behavioralbehavioralstar-methodownershipstakeholder-management
  • Trees & GraphsEasyAuto-graded
    Nearest Shared Ancestor in an Array-Encoded Binary Tree

    Find the deepest node that is an ancestor of two given values in a binary tree stored as a heap-indexed array, using a parent map and ancestor walk.

    Trees & Graphsbinary-treelowest-common-ancestorbfshash-map
  • Math & Bit ManipulationEasyAuto-graded
    Shelf Stock Versus Random Demand in a Checkout Line

    Compute binomial probabilities that a limited stock covers random demand from a line of customers, both as at most M buyers and as exactly M buyers.

    Math & Bit Manipulationprobabilitybinomialcombinatoricsmath
  • BehavioralMediumModel answer
    Behavioral Round: Technical Showcase and a Release Gone Wrong

    Prepare two connected stories: a technically deep project with explicit tradeoffs and measurable results, and a release that hurt production, covering response, root cause and prevention.

    Behavioralbehavioralownershipincident-responsearchitecture-tradeoffs
  • Greedy & IntervalsMediumAuto-graded
    Largest Set of Compatible Time Slots on One Worker

    Find the largest subset of half-open time intervals that can run on one worker without overlap, testing greedy interval selection by earliest finish.

    Greedy & Intervalsgreedyintervalssorting
  • Greedy & IntervalsMediumAuto-graded
    Fewest Badges for a Row of Scored Players

    Greedy two-pass array problem: assign the minimum total badges so each player gets at least one and any player scoring higher than an adjacent player gets strictly more badges.

    Greedy & Intervalsgreedyarraytwo-passneighbors
  • BehavioralMediumModel answer
    Three Behavioral Stories: Disagreement, Hard Bugs, Vague Goals

    Prepare three structured behavioral stories on a cross-team disagreement, a tough technical problem, and an unclear assignment, each ending with a lesson and a concrete change you would make.

    BehavioralbehavioralSTARconflict-resolutionambiguity
  • Arrays & HashingEasyAuto-graded
    Filter Names Absent From a Blocklist After Cleanup

    Return the items of one string list whose trimmed, lowercased form is missing from a second list, keeping original spelling, order, and duplicates; tests hash sets and normalization.

    Arrays & Hashinghash-setstringsnormalizationfiltering
  • Data Structure DesignMediumModel answer
    Build a Thread-Safe Cart with Pluggable Promotions

    Design an in-memory shopping cart with exact money arithmetic, strategy-based promotions, an itemized receipt, and safe concurrent updates.

    Data Structure Designobject-oriented-designstrategy-patternvalue-objectconcurrency