KatInterview

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

Interview Practice Problems

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

5991
Problems
2219
Auto-graded
15
Topics
270
Added today

Showing 421–450 of 3772 results

  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • System DesignMediumModel answer
    Build a Reliable Recurring Task Scheduler with Recovery

    Design a service that fires recurring tasks on time-zone-aware schedules, survives crashes, handles missed runs, and avoids duplicate logical runs.

    System Designsystem-designschedulerdistributed-systemsidempotency
  • System DesignMediumModel answer
    Build a Real-Time Story-Grouping News Feed Platform

    Design a platform that pulls in millions of articles daily, removes syndicated copies, groups coverage into evolving stories, and serves fast ranked feeds to tens of millions of users.

    System Designsystem-designdeduplicationclusteringfeed-ranking
  • SQL & DataHardModel answer
    Daily KPI Pipeline and Retention Cohorts in SQL

    Write SQL for a photo app: totals, top month, top followed user, daily KPI and follower-bucket tables in Los Angeles time, and week-1 retention cohorts.

    SQL & Datasqlwindow-functionstimezonescohort-retention
  • System DesignMediumModel answer
    Build a Live Programming Competition Judge at Scale

    Architect a platform where tens of thousands of contestants submit code during timed contests, with sandboxed grading, fast verdicts and a continuously updated ranking.

    System Designsystem-designsandboxingmessage-queueleaderboard
  • BehavioralMediumModel answer
    Your Ideal Team Setup: Habits, Norms, and Your Role in It

    Explain the working conditions that bring out your best, separating must-haves from preferences, and show how you help create them and adapt when a team works differently.

    Behavioralbehavioralteamworkculture-fitcollaboration
  • Machine LearningHardModel answer
    Build a Causal Transformer Language Model Block by Block

    Write a decoder-only transformer from memory in PyTorch: embeddings, hand-written causal multi-head attention, feed-forward layers, residual wiring, and a logits head.

    Machine Learningtransformerpytorchself-attentioncausal-mask
  • Trees & GraphsEasyModel answer
    Binary Tree Lateral Perspective and Zero-Sum Triplet Extraction

    Solve two fundamental interview tasks: identifying the rightmost nodes of a binary tree by level and finding non-duplicate zero-sum triplets in an un-ordered array.

    Trees & Graphsbinary-treebfstwo-pointerssorting
  • BehavioralMediumModel answer
    Leading a Hard-to-Diagnose Production Incident: Behavioral Answer

    Describe a time you drove the investigation of a serious production failure with no obvious cause, covering hypotheses, prioritization, communication, and lasting prevention.

    Behavioralbehavioralincident-responseroot-cause-analysisstar-method
  • Statistics & ExperimentsMediumModel answer
    Renew or Retire: Evaluating a Costly Flagship Series

    Build a data-driven framework to decide whether a streaming service should fund another season of an expensive long-running original series, including how to estimate churn from ending it.

    Statistics & Experimentscausal-inferenceproduct-analyticschurndecision-framework
  • Data Structure DesignMediumModel answer
    Build a Type-Ahead Catalog Lookup with Cancellation and Caching

    Build an accessible type-ahead lookup that delays requests, discards outdated responses, remembers past queries, supports keyboard control, and copes with errors.

    Data Structure Designfrontendreactdebounceabortcontroller
  • Data Structure DesignEasyModel answer
    Dismiss-Then-Navigate: A Browser Notice Helper in Plain JS

    Write a vanilla JavaScript function that shows a message to the user and moves the page to a given address once the message is closed, skipping the move when the address is not a non-empty string.

    Data Structure Designjavascriptdombrowser-apisevent-handling
  • Data Structure DesignMediumModel answer
    Build a Layered In-Memory Work Tracker with Quotas and Deadlines

    Design an in-memory work tracker in four growing stages: CRUD, name and priority queries, per-user limits with timed assignments, then completion and lateness reports.

    Data Structure Designdesignin-memoryhash-mapsorting
  • 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