KatInterview

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

Interview Practice Problems

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

6128
Problems
2272
Auto-graded
15
Topics
275
Added today

Showing 3151–3180 of 6128 results

  • System DesignMediumModel answer
    Digital Game Marketplace: Catalog, Checkout, Downloads, Reviews

    Design a digital game marketplace covering category browsing, a payment-safe purchase flow, entitlement-gated downloads, and a review system, with explicit policies and retry-safe behavior.

    System Designsystem-designe-commerceidempotencycdn
  • System DesignMediumModel answer
    Cache Set Collisions, False Sharing, and GPU Bank Conflicts

    Work through how addresses map to cache sets to show conflict misses, then separate them from false sharing and GPU shared-memory bank conflicts, with the right fix for each.

    System Designcpu-cachefalse-sharinggpu-bank-conflictsmemory-hierarchy
  • Greedy & IntervalsMediumAuto-graded
    Courier Earnings from Overlapping Order Timelines

    Sweep over unsorted accept/fulfill events to total a courier's earnings, where pay per minute scales with the number of simultaneously open orders.

    Greedy & Intervalssweep-linesortingintervalssimulation
  • Data Structure DesignHardModel answer
    Steady-Cadence Frame Player with Bounded Decode Buffer

    Build a thread-safe player where a decoder thread fills a bounded buffer and a render thread emits frames at a fixed rate on a monotonic clock, with clean pause, stop and underrun handling.

    Data Structure Designconcurrencyproducer-consumerthreadingscheduling
  • Arrays & HashingMediumAuto-graded
    Target-Sum Windows and Largest Building Cluster

    Combine a prefix-sum hash map to count contiguous slices summing to a target with a grid flood fill to find the largest 4-connected cluster of buildings.

    Arrays & Hashingprefix-sumhash-mapflood-fillgrid
  • BehavioralMediumModel answer
    Walk Through a Project You Drove From Start to Finish

    Present one project you owned end-to-end, covering goals, decisions, risks, stakeholders, timeline, measured results, and lessons learned, in a structured and honest way.

    Behavioralbehavioralproject-deep-diveownershiptrade-offs
  • Arrays & HashingMediumAuto-graded
    Peak Pace Over Tightest 1000-Meter Windows in Interval Logs

    Sliding-window problem: for each end index find the shortest suffix with at least 1000 meters, compute its average speed, and return the maximum across all end indices.

    Arrays & Hashingsliding-windowtwo-pointersprefix-sumsarrays
  • System DesignHardModel answer
    Build a Fault-Tolerant Distributed Task Timer Service

    Design a distributed service that runs one-off and repeating tasks on time at the scale of millions of jobs, survives worker crashes, and limits duplicate runs despite clock skew.

    System Designdistributed-systemsjob-schedulingleasessharding
  • System DesignMediumModel answer
    Real-Time Analytics Dashboard: Range Queries and Event-Time Completeness

    Design a backend that turns a live event stream into dashboard metrics, serves arbitrary time-range queries from rollups, and uses watermarks to decide when event-time windows are final.

    System Designsystem-designstream-processingwatermarkstime-series
  • System DesignHardModel answer
    Low-Power Wrist Pulse Tracker: Sensing and Duty-Cycling Design

    Design a wrist-worn pulse-tracking subsystem that stays under a 5 mW budget, updates within 2 seconds, and stays accurate during arm motion and poor sensor contact.

    System Designembedded-systemssignal-processingpower-managementwearables
  • Machine LearningHardModel answer
    Noisy Image Dataset Cleanup and a NumPy Two-Layer Net with Gradient Checks

    Plan a data-quality pipeline for a noisy, imbalanced small-image dataset, then derive and numerically verify backprop for a two-layer softmax network in NumPy.

    Machine Learninglabel-noiseclass-imbalancebackpropagationgradient-checking
  • Arrays & HashingEasyAuto-graded
    Roster Screening with Optional Age, Pay, and Job Limits

    Scan a list of employee records and keep those meeting every enabled optional range or membership rule, preserving order and leaving the input untouched.

    Arrays & Hashingfilteringhash-setoptional-parameterssimulation
  • Trees & GraphsMediumAuto-graded
    Live Archipelago Counter with Incremental Land Reclamation

    Count 4-connected land regions in a grid, then report the updated region count after each cell is converted from water to land, using incremental connectivity.

    Trees & Graphsunion-findgridconnected-componentsincremental-updates
  • System DesignMediumModel answer
    Build an Internal Platform to Train, Register, and Serve ML Models

    Design an internal ML platform covering experiment tracking, a model registry, online and batch serving, and monitoring, including the API and the trade-off between containers and serverless.

    System Designmlopsmodel-servingmodel-registryfeature-store
  • Greedy & IntervalsMediumAuto-graded
    Booked Time and Peak Room Demand for a Schedule

    Compute the total time covered by a set of half-open intervals and the maximum number of simultaneously active intervals, ignoring empty or reversed ones.

    Greedy & Intervalsintervalssweep-linesortingmerge-intervals
  • Arrays & HashingMediumAuto-graded
    Batch Gradient Descent Linear Regression Session Simulator

    Simulate a fit/predict command sequence for a linear model trained with batch gradient descent on mean squared error, using plain Python lists.

    Arrays & Hashinggradient-descentlinear-regressionmsesimulation
  • Heaps, Sorting & SearchMediumAuto-graded
    Cheapest Full Merge and Matching-Sum Product Total

    Combine a Huffman-style min-heap greedy for the cheapest full merge with a frequency-map count of index pairs hitting a target sum, summing their products.

    Heaps, Sorting & Searchheapgreedyhash-mapcounting
  • System DesignEasyModel answer
    Spring Dependency Injection: Wiring Styles, Scopes and Cycles

    Explain how Spring's container wires beans, compare constructor, setter and field injection, resolve ambiguous beans, reason about scope and thread safety, and untangle circular dependencies.

    System Designspringdependency-injectioniocjava
  • Data Structure DesignHardModel answer
    Build a Accessible, Controllable Select Menu in React

    Design and implement a reusable select-style menu in React with controlled and uncontrolled state, keyboard support, ARIA semantics, and a plan for production hardening.

    Data Structure Designreactfrontendaccessibilitycomponent-design
  • Data Structure DesignMediumAuto-graded
    Lifespan Lookups for Orders and Order Groups in a Replay Log

    Simulate a class through an operations list, tracking per-order and per-group start and end times so lookups run in constant time, with groups reporting 0 while any member is open.

    Data Structure Designhash-mapdesignsimulationaggregation
  • Data Structure DesignHardModel answer
    Live Portfolio Valuation Across Tag-Filtered Books

    Design a class that maintains mark-to-market profit for many tag-filtered trade groups while trades and price ticks stream in, without rescanning trade history on each update.

    Data Structure Designdesignhashingincremental-updatelazy-evaluation
  • System DesignMediumModel answer
    Secure Landing Page for a Multi-Tenant Cloud Dashboard

    Design the post-login home screen of a multi-tenant cloud dashboard, covering authentication, scoped permissions, tenant isolation, tamper-resistant audit logging, and low-latency scaling.

    System Designsystem-designauthenticationauthorizationrbac
  • BehavioralMediumModel answer
    Juggling an Urgent Interrupt Against a Committed Roadmap

    Describe a time an urgent request collided with your planned commitments, and explain how you chose, who you informed, and how you changed course as facts emerged.

    Behavioralbehavioralprioritizationstakeholder-communicationtrade-offs
  • Statistics & ExperimentsMediumModel answer
    Shrinking Feed Cards by 15%: Test Design and a Regional Revenue Split

    Plan an experiment for a more compact feed layout, then work out why one market's revenue rose while another's fell and what to do about it.

    Statistics & Experimentsab-testingexperiment-designmetric-decompositionheterogeneous-effects
  • System DesignMediumModel answer
    Build a Multi-Provider Payment Routing and Ledger Platform

    Design a merchant payment platform that routes charges across several processors, survives timeouts without double-charging, and keeps refunds, captures and authorizations consistent.

    System Designsystem-designpaymentsidempotencystate-machine
  • StringsEasyAuto-graded
    Tab-Scoped Ticket Search with Case-Insensitive Matching

    Filter support tickets by tab, then by a case-insensitive substring match on title or assignee, handling blank queries and unassigned tickets.

    Stringsstringsfilteringcase-insensitivesimulation
  • Trees & GraphsMediumModel answer
    Crawl One Site: Sequential Traversal, Then a Parallel Version

    Collect every page reachable from a seed URL on the same host, ignoring URL fragments and fetching each page once, first with one thread and then with safe concurrency.

    Trees & Graphsweb-crawlerbfsconcurrencythread-safety
  • Arrays & HashingMediumAuto-graded
    Remainder-Sum Windows and Bracket Cleanup

    Count contiguous subarrays whose sum has a given remainder using prefix-sum remainders, and delete the fewest parentheses to balance a string in a fixed, deterministic way.

    Arrays & Hashingprefix-summodular-arithmetichash-countinggreedy
  • Heaps, Sorting & SearchMediumAuto-graded
    One-Car Sweep Scheduler: Order the Elevator Stops

    Order a single elevator's pending floor requests using a one-reversal sweep policy with a priority queue, merging duplicates and respecting the starting direction.

    Heaps, Sorting & Searchheappriority-queuesortingsimulation
  • Data Structure DesignMediumModel answer
    Minesweeper Solver: Deduction Rules and Mine Probabilities

    Design a Minesweeper bot that derives certain mines and safe cells from overlapping numbers, estimates mine probabilities when it must guess, and is evaluated by win rate.

    Data Structure Designminesweeperconstraint-satisfactionprobabilitybacktracking