KatInterview

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

Interview Practice Problems

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

5993
Problems
2220
Auto-graded
15
Topics
270
Added today

Showing 451–480 of 3773 results

  • Machine LearningHardModel answer
    Recommender for a Fast-Changing Catalog with Few Interactions

    Design a two-stage recommender for a content app where users and items are constantly new, covering models, exploration, off-policy evaluation, A/B testing and a strict latency budget.

    Machine Learningrecommender-systemscold-starttwo-toweroff-policy-evaluation
  • Data Structure DesignMediumModel answer
    Design a Thread-Safe Log Rotating Sink

    Implement a thread-safe, size-bounded rotating file sink class adhering to Liskov substitution and Python context manager protocols.

    Data Structure Designobject-oriented-designconcurrencyfile-iopython
  • Data Structure DesignHardModel answer
    Build a Scalable Memory-Constrained API Ingestion Pipeline

    Ingest, normalize, filter, and stream-sort paginated API data under memory constraints with exponential backoff and rate limiting.

    Data Structure Designpaginationrate-limitingexternal-sortdata-engineering
  • Math & Bit ManipulationEasyModel answer
    Counting Iterations of a C Loop With an Assignment Condition

    Work out how many times a C for-loop body runs when its condition is an assignment expression rather than a comparison, and explain the final variable values.

    Math & Bit Manipulationc-languagecontrol-flowoperatorsassignment-expression
  • Data Structure DesignMediumModel answer
    Interleaved Dual-Thread Sequencer

    Coordinate two concurrent threads to output consecutive integers from 1 to n in strictly alternating parity order.

    Data Structure Designconcurrencythreadingsynchronizationmutex
  • System DesignHardModel answer
    Build a Rule-Based Event Fan-Out Service with Webhook Delivery

    Design a platform that takes up to a million fire-and-forget events per second and pushes each one to the webhooks of tenants whose filter rules match, with retries, isolation and security.

    System Designsystem-designwebhooksevent-streamingmulti-tenancy
  • Statistics & ExperimentsHardModel answer
    Do Heavily Visited Ads Really Attract More Abuse Reports?

    Work out whether the link between an ad's traffic and its abuse reports is causal or an artifact of exposure and selection, then design the analysis, model, experiment and alert rules.

    Statistics & Experimentscausal-inferenceexperimentationnegative-binomialinstrumental-variables
  • Statistics & ExperimentsMediumModel answer
    Investigating a Sudden Fall in Card Application Approvals

    Approvals on credit-card applications fell sharply overnight after months of stability. Lay out how you would find the cause, what data you need, and which hypotheses to test.

    Statistics & Experimentsroot-cause-analysismetric-diagnosismix-shiftfraud-risk
  • System DesignMediumModel answer
    Crash-Safe Parallel Downloader for Versioned Data Bundles

    Design a per-node client that pulls huge versioned file bundles over ranged HTTP, resumes after failures using verified chunks, and exposes only fully validated bundles.

    System Designsystem-designresumable-downloadshttp-rangeatomic-publish
  • Machine LearningMediumModel answer
    Mini-Batch SGD versus Adam: Update Rules and Trade-offs

    Derive the parameter update rules for mini-batch SGD (with and without momentum) and Adam, explain bias correction, and compare the two on speed, tuning, memory and generalization.

    Machine Learningoptimizationsgdadamdeep-learning
  • System DesignMediumModel answer
    Seat Reservation Platform for High-Demand Ticket Sales

    Design a ticketing backend where thousands of buyers compete for the same seats, with temporary holds, safe checkout, and a firm guarantee that no seat is sold twice.

    System Designsystem-designconcurrencybookingdistributed-systems
  • Statistics & ExperimentsHardModel answer
    Judging Demand and Success for a Multi-Party Voice Feature

    Use only one-to-one call logs to infer unmet demand for multi-person calls, then define launch success and design an experiment that handles network interference.

    Statistics & Experimentsproduct-analyticsexperiment-designnetwork-interferenceproxy-metrics
  • Statistics & ExperimentsEasyModel answer
    Testing a Swipeable Related-Pins Module in a Social Feed

    Design an A/B test for a horizontally swipeable content module in a home feed: pick a primary metric, define guardrails, and separate real engagement gains from cannibalization.

    Statistics & Experimentsab-testingmetricsguardrail-metricscannibalization
  • BehavioralMediumModel answer
    Data Analyst Behavioral Round: Experience, Partnerships, Setbacks

    A three-part behavioral prompt for data analyst candidates: summarize your analytics background, describe a cross-functional win, and explain a project that went off track.

    Behavioralbehavioraldata-analystSTARstakeholder-management
  • System DesignEasyModel answer
    Execution Models, Go Concurrency, and Choosing a Database

    Explain how sync/async differs from blocking/non-blocking, when Go channels or mutexes fit best, and how relational and NoSQL stores compare for backend workloads.

    System Designconcurrencygolangasync-iosql-vs-nosql
  • Machine LearningMediumModel answer
    Building Search for a Mobile App Marketplace

    Design an end-to-end search system for a mobile app marketplace covering retrieval, ranking, personalization, cold start, abuse prevention, experimentation, and the path from heuristics to learned ranking.

    Machine Learningsearchrankingml-system-designretrieval
  • Machine LearningMediumModel answer
    Choosing Artwork per Viewer: Designing a Poster Ranking Service

    Design an ML system that picks which candidate artwork to display for each title and viewer on a video streaming service, covering reward design, exploration, cold start, serving, and evaluation.

    Machine Learningcontextual-banditpersonalizationoff-policy-evaluationcold-start
  • System DesignMediumModel answer
    Event Store for Shopper Behavior Analytics and Fixed Reports

    Design a storage and ingestion system for shopper activity events that serves a known set of reports, such as regional unique viewers and top orders, with low latency.

    System Designsystem-designanalyticsolapevent-modeling
  • Machine LearningMediumModel answer
    OLS Guarantees and Attention Mechanics in Transformers

    Explain when OLS is the best linear unbiased estimator, how correlated features inflate variance, and how attention, positional signals and long-context costs work in Transformers.

    Machine Learninglinear-regressiongauss-markovmulticollinearitytransformers
  • System DesignEasyModel answer
    Ping Works, but Is HTTPS Port 443 Open? Network Triage

    Decide whether a reply to ping proves a server's HTTPS port is usable, and explain how to test the port and narrow down where a failure occurs.

    System Designnetworkingtcpicmpfirewall
  • Data Structure DesignMediumModel answer
    Spot the Slicing and Double-Free Bugs in a C++ Buffer Hierarchy

    Review a C++ class hierarchy that owns a raw heap buffer, explain why passing it by value breaks it, and rewrite it with modern ownership and correct polymorphic dispatch.

    Data Structure Designcppraiirule-of-fiveobject-slicing
  • BehavioralMediumModel answer
    Three Stories: Tight Deadline, Extra Mile, Winning Over Skeptics

    Prepare three behavioral stories showing delivery under a compressed timeline, initiative beyond your role, and persuading stakeholders who disagreed, with trade-offs, results and lessons.

    Behavioralbehavioralleadershipstar-methodownership
  • System DesignHardModel answer
    Architecting a Real-Time Car Dispatch Backend

    Design the backend for an on-demand car service: live driver positions, sub-second nearest-driver matching, a reliable trip lifecycle, and no double bookings at city scale.

    System Designsystem-designgeospatial-indexingreal-timeconsistency
  • System DesignMediumModel answer
    Designing a Scalable Backend for Credit Card Processing

    Design a scalable backend architecture for a card issuer handling real-time payment processing, fraud detection, ledger management, credit limits, and credit bureau batch exports.

    System Designsystem-designfintechevent-drivendistributed-systems
  • BehavioralMediumModel answer
    Pushing Back on a Rushed Model Mandate From a Senior Partner

    Describe a time a senior stakeholder demanded a risky ML approach on a tight deadline, and how you found their real goal, tested the idea with evidence, and delivered a better path.

    Behavioralbehavioralstakeholder-managementdisagree-and-commitml-leadership
  • System DesignMediumModel answer
    Build a Minimal cp in C++ and Explain What the Kernel Does

    Write a C++ file-copy tool using POSIX calls, then explain page cache, write-back and kernel-assisted copy, and harden it with RAII, atomic replacement and directory support.

    System Designoperating-systemscppsystem-callsraii
  • SQL & DataMediumModel answer
    Build a Pandas Pipeline for Portfolio Returns and Risk Metrics

    Design a pandas workflow that cleans price CSVs, builds portfolio returns under several rebalancing rules, and reports return, risk, Sharpe and drawdown metrics for multiple portfolios.

    SQL & Datapandastime-seriesportfolio-analyticsdata-cleaning
  • BehavioralMediumModel answer
    Present a Project's Impact, Then Give a Mini Technical Lesson

    Structure a behavioral answer that covers one project's scope, trade-offs, results and regrets, then explain a recently learned technical idea clearly to a specific listener.

    Behavioralbehavioraltechnical-leadershipcommunicationproject-deep-dive
  • System DesignMediumModel answer
    Design a Pay Calculation API with Retries and Idempotency

    Design a resilient HTTP API for event ingestion and worker earnings computation, featuring idempotency keys, deterministic windowing, batch partial success, and retries.

    System Designapi-designidempotencyfault-tolerancedistributed-systems
  • Data Structure DesignHardModel answer
    Payment Command Parser and Lifecycle State Machine Design

    Design a parser for fixed-arity payment commands and an object-oriented lifecycle state machine, and identify which business rules need clarification before implementation.

    Data Structure Designstate-machineparsingobject-oriented-designvalidation