KatInterview

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

Interview Practice Problems

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

5988
Problems
2219
Auto-graded
15
Topics
271
Added today

Showing 391–420 of 3769 results

  • BehavioralMediumModel answer
    Prove You Can Hit the Ground Running in an Ad Tech Role

    Plan how to show a hiring manager that your past ad-platform work covers most of a job description, with honest gap handling and well-structured stories.

    Behavioralbehavioralads-engineeringstar-methodhiring-manager
  • System DesignMediumModel answer
    Build a Backend for On-Demand Car Rides and Driver Dispatch

    Design a service that pairs passengers with close-by available drivers, ingests live driver positions, and carries each trip from request to payment without ever double-booking a driver.

    System Designsystem-designgeospatial-indexdispatchreal-time
  • Data Structure DesignMediumModel answer
    Build a Single-Use Password Reset Token Manager

    Design an in-memory service that issues reset tokens, enforces expiry and a failed-attempt cap, rejects reused passwords, and makes each token usable only once.

    Data Structure Designstate-machinehash-mapauthenticationttl-expiry
  • System DesignHardModel answer
    Building a Local Business Review Service and a Link Shortener

    Design a location-aware business discovery and review platform, then a short-link service, covering data models, search, caching, scaling reads and writes, and operational trade-offs.

    System Designsystem-designgeospatial-searchcachingsharding
  • BehavioralMediumModel answer
    Behavioral Round Prep: Failure, Ambiguity and Cross-Team Influence

    Prepare reusable stories for a senior data-science behavioral round covering failure, ambiguity, learning fast, persuasion, conflict, inclusion and respectful disagreement with a manager.

    Behavioralbehavioralstar-methodambiguitycross-team-collaboration
  • BehavioralMediumModel answer
    Launch Deadline vs. Code Quality: Disagreeing With a PM

    Describe a real conflict with a product partner over a fixed ship date versus engineering health, covering the trade-offs you weighed, how you aligned, and how the deferred work got done.

    Behavioralbehavioralleadershipstakeholder-managementtechnical-debt
  • Statistics & ExperimentsMediumModel answer
    Unskippable vs Skippable Video Ads: Card Campaign Profit Math

    Compare a forced-view video ad, a skippable ad and doing nothing for a cashback credit card launch: compute profit, find break-even conversion, and design the decision and tests.

    Statistics & Experimentsmarketing-analyticsunit-economicsincrementalityexperiment-design
  • BehavioralMediumModel answer
    Recruiter Phone Screen for a Customer-Facing Data Engineer

    Prepare short, honest, recordable answers for a recruiter call covering location, role understanding, background, client work, data tooling, a platform project and languages.

    Behavioralbehavioralrecruiter-screencustomer-facingdata-engineering
  • Data Structure DesignMediumModel answer
    Repair a Faulty LRU Cache and Add Crash-Safe Persistence

    Find and fix the bugs in a broken fixed-capacity LRU cache, then make its acknowledged writes survive a crash using an append-only log, snapshots and atomic file replacement.

    Data Structure Designlru-cachedebuggingwrite-ahead-logcrash-recovery
  • System DesignMediumModel answer
    Design a Scalable Real-Time Event Notification Engine

    Design a robust event delivery platform supporting independent fan-out isolation, classified retry delays, rate limiting, and historical replays.

    System Designsystem-designpub-subevent-drivenrate-limiting
  • Machine LearningHardModel answer
    How Bagging and Boosting Trade Off Bias Against Variance

    Explain how random forests and gradient boosting reshape the bias-variance decomposition, derive the variance of correlated averages, and say when each ensemble is the better choice.

    Machine Learningbias-variancerandom-forestgradient-boostingensembles
  • System DesignMediumModel answer
    Design a Request-Response Based Instant Messaging Architecture

    Architect a 1-on-1 instant messaging backend relying exclusively on standard HTTP request-response APIs, managing message synchronization, ordering, idempotency, and push delivery at scale.

    System Designsystem-designmessagingdistributed-systemshttp-polling
  • System DesignHardModel answer
    Kafka Ordering, Durability, and Exactly-Once Processing

    Describe how Kafka's partitioned, replicated log and consumer groups shape ordering, scale, and resilience, and how to get effectively-once results from a pipeline.

    System Designkafkamessagingdelivery-semanticsreplication
  • Statistics & ExperimentsHardModel answer
    Measuring the Causal Impact of a New In-App Marketplace

    Plan an experiment to estimate how a new in-app shopping feature affects engagement and revenue, covering design, metrics, selection bias, interference, and the launch decision.

    Statistics & Experimentsab-testingcausal-inferencenetwork-effectsdiff-in-diff
  • Statistics & ExperimentsMediumModel answer
    Testing Opt-In Reward Ads in a Free-to-Play Mobile Game

    Design an A/B test for opt-in reward ads in a free-to-play game: choose metrics, set randomization and duration, and measure whether ads cannibalize in-app purchases.

    Statistics & Experimentsab-testingexperiment-designmetricscannibalization
  • System DesignMediumModel answer
    Build a Real-Time Direct Messaging Backend for Millions of Users

    Design a horizontally scalable direct-messaging backend with live delivery, stored history, presence, per-conversation ordering and fault tolerance for 10 million daily users.

    System Designsystem-designwebsocketmessagingcassandra
  • Data Structure DesignMediumModel answer
    Thread-Safe Kitchen: Cook-Once, Pickup-Once Order Pipeline

    Build a thread-safe kitchen where producers place orders, chefs cook them, and customers block until their dish is ready, with no races, deadlocks, or busy-waiting.

    Data Structure Designconcurrencycondition-variableblocking-queuethread-safety
  • Data Structure DesignMediumModel answer
    Time-Travel Key-Value Store with Point-in-Time Snapshots

    Design a hash-map-backed store that records every write with an increasing timestamp, answers reads as of any past moment, and exports a frozen plain-map snapshot.

    Data Structure Designhash-mapbinary-searchversioningsnapshot
  • System DesignMediumModel answer
    Circular Waits and Lock Contention: Spotting and Preventing Deadlocks

    Explain what a deadlock is, the conditions that make one possible, realistic scenarios, and the engineering techniques used to prevent, avoid, detect and recover from them.

    System Designconcurrencydeadlocklockingoperating-systems
  • BehavioralMediumModel answer
    Motivation, Setbacks, and Leading a Team Through Delivery Pressure

    A two-part behavioral practice problem on explaining why you want a specific role, responding to a rejection, and describing how you would manage delivery, upward pressure, and extra effort.

    Behavioralbehavioralleadershipmotivationconflict-resolution
  • BehavioralMediumModel answer
    Running a Production Incident from Page to Postmortem

    Describe how you own an on-call shift and drive a production incident from the first page through mitigation, communication, verified recovery, and lasting fixes.

    Behavioralon-callincident-responsepostmortemcommunication
  • System DesignMediumModel answer
    Cutting Duplicate HTTP Calls in a curl-Driven Workflow

    Instrument an HTTP client to count and attribute its calls, detect wasteful repeats, reduce them safely, and prove the change is correct and stays fixed.

    System Designobservabilityhttpcachingbatching
  • System DesignMediumModel answer
    How the JVM Allocates and Reclaims Memory Without Manual Freeing

    Walk through how the JVM places objects in memory, decides which are dead, reclaims them with different collectors, and why leaks and resource problems still occur.

    System Designjavajvmgarbage-collectionmemory-management
  • SQL & DataMediumModel answer
    Calculate Top Customer Revenue Share and 7-Day Growth by Product Model

    Write a SQL query to compute 7-day revenue growth and identify top spenders per product model with tie-breaking logic based on historical purchase date.

    SQL & Datasqlwindow-functionsaggregationsjoins
  • System DesignHardModel answer
    Exactly-Once Click Event Cleanup in a Streaming Lake Pipeline

    Design a Spark Structured Streaming job that removes retry-induced duplicate click events at 10M/s with a 24-hour window, handling late data, hot keys, idempotent writes, and backfills.

    System Designsparkstructured-streamingdeduplicationdata-skew
  • Heaps, Sorting & SearchMediumModel answer
    Ordering a Hundred Million Decimal Digits in Place

    Order a huge byte array holding only the values 0 to 9 in linear time with constant extra memory, then reason about storage layout, memory bandwidth and expected runtime.

    Heaps, Sorting & Searchcounting-sortin-placememory-bandwidthbytearray
  • BehavioralHardModel answer
    Ten Leadership Stories Every Product Manager Should Prepare

    Build a bank of structured, metric-backed stories that answer ten common product leadership prompts, from high-impact launches to disagreeing and committing.

    Behavioralbehavioralproduct-managementleadershipstar-method
  • 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