KatInterview

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

Interview Practice Problems

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

6079
Problems
2254
Auto-graded
15
Topics
270
Added today

Showing 1891–1920 of 3825 results

  • Machine LearningHardModel answer
    Building an Enterprise Document Q&A Assistant with Retrieval

    Design a production retrieval-augmented question-answering service over company documents, covering indexing, search, grounding, freshness, access control, evaluation and operations.

    Machine Learningragretrievalembeddingsllm
  • Data Structure DesignMediumModel answer
    Design a Pluggable Payroll Cost Estimator

    Design the types and API that compute an employee's full cost from salary, tax, benefits, and a signed location adjustment, with exact money math, explicit missing-rule handling, and versioned rules.

    Data Structure Designobject-modelingapi-designmoney-handlingconfiguration-versioning
  • System DesignHardModel answer
    Crawl the Web from One Seed Across a 1,000-Machine Fleet

    Design a distributed crawler that starts from one seed URL and spreads work over 1,000 machines, covering coordination, balancing, failure handling, and growth.

    System Designdistributed-systemsweb-crawlerconsistent-hashingfault-tolerance
  • SQL & DataMediumModel answer
    Quarterly Take-Home Pay and Latest-Period Drop Report

    Write a query that totals each employee's first-quarter take-home pay and flags those whose most recent paycheck fell below the one before it, with the percentage drop.

    SQL & Datasqlwindow-functionsaggregationcte
  • System DesignMediumModel answer
    Building an Append-Only Log Store with Real-Time File Following

    Design a durable, scalable store that ingests huge volumes of appended log records, serves whole-file reads, and lets readers follow files that are still being written.

    System Designsystem-designlog-storagepartitioningbatching
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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 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
  • 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
  • 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
  • System DesignEasyModel answer
    Retrying HTTP GET Client with Backoff and Rate-Limit Handling

    Write a Python wrapper around requests.get that retries transient failures with exponential backoff, honors Retry-After on 429, fails fast on client errors, and always returns one result shape.

    System Designpythonrequestsretriesexponential-backoff
  • System DesignMediumModel answer
    Real-Time Ad Engagement Counting Pipeline and Advertiser Dashboard

    Design a pipeline that ingests millions of ad click events per second and serves near-real-time, windowed counts per ad to advertisers, with deduplication and late-data handling.

    System Designsystem-designstreamingkafkaflink
  • Trees & GraphsMediumModel answer
    Print a Reporting Hierarchy and List Two-Level-Down Pairs

    Turn manager rows into a tree, infer the root, print it with depth-based dot indentation, or list every (manager, employee) pair exactly two levels apart.

    Trees & Graphstreepreorderiterative-dfshash-map
  • System DesignHardModel answer
    Warm-Restart Persistence for an In-Memory LRU Cache

    Design how a single-node LRU cache saves its entries and recency order so it restarts warm after a crash, balancing write-path latency, durability, and bounded recovery time.

    System Designlru-cachewrite-ahead-logsnapshotscrash-recovery
  • Statistics & ExperimentsMediumModel answer
    Raising Web-to-App Installs: Funnel Diagnosis and A/B Tests

    Diagnose where mobile-web customers drop before installing the native app, then design randomized experiments that raise installs while protecting incremental orders and retention.

    Statistics & Experimentsab-testingfunnel-analysisexperiment-designattribution
  • System DesignMediumModel answer
    Adding Trip-Level Limits to an Expense Policy Checker

    Extend a per-expense policy engine so it also enforces trip-wide spending caps, and redesign its output to report both line-item and trip-level violations with clear explanations.

    System Designsystem-designrules-engineaggregationapi-design
  • System DesignMediumModel answer
    Live Comment Thread with Instant Local Posting and Reconciliation

    Design a live comment feature where new posts show up instantly on the author's screen, then reconcile safely with server acknowledgments, broadcast events, retries, and durable storage.

    System Designsystem-designoptimistic-uiidempotencyreal-time