KatInterview

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

Interview Practice Problems

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

6077
Problems
2253
Auto-graded
15
Topics
271
Added today

Showing 1921–1950 of 3824 results

  • SQL & DataMediumModel answer
    Daily New, Retained and Churned Devices by Platform

    Write one SQL query that classifies devices as new, retained or churned for 2025-09-01 from a raw event log, and reports net growth overall and per platform.

    SQL & Datasqlcteretentiondeduplication
  • Machine LearningEasyModel answer
    Which Ensemble Method Relies on Bootstrap Aggregation?

    Pick the model that is a canonical example of bootstrap aggregating from four options, and justify the choice by explaining how bagging reduces variance.

    Machine Learningbaggingensemble-methodsrandom-forestbias-variance
  • Linked ListsMediumModel answer
    Sequence Storage Trade-offs: Contiguous Arrays vs Pointer Chains

    Contrast contiguous arrays, linked lists, and unrolled lists for indexed reads, inserts, growth, traversal speed, and cache behavior, and say when each one wins.

    Linked Listsarrayslinked-listsunrolled-linked-listcache-locality
  • System DesignEasyModel answer
    Containerizing and Shipping a Python Model Server

    Explain how containers work, tighten a naive Dockerfile for an ML inference API, and outline a CI/CD pipeline that safely ships code and model changes.

    System Designdockerci-cdmlopscontainers
  • System DesignHardModel answer
    From Shader Source to GPU Code: Compilers and Modern Graphics APIs

    Describe how shader source becomes GPU machine code, contrast explicit and legacy graphics APIs, and sketch a small shader compiler with front end, IR, and SPIR-V back end.

    System Designshader-compilergraphics-apispir-vvulkan
  • System DesignMediumModel answer
    Mini Ledger Service: Credits, Debits and Safe Balances

    Design and build a small full-stack ledger app with an API, storage, a basic UI and tests that records credits and debits and never lets an account balance drop below zero.

    System Designapi-designtransactionsidempotencyconcurrency
  • BehavioralMediumModel answer
    Four Behavioral Stories: Impact, Coaching, Conflict, Feedback

    Prepare structured, example-driven answers about a high-impact project, mentoring someone, resolving a disagreement, and responding to feedback that your communication is unclear.

    Behavioralbehavioralstar-methodmentorshipconflict-resolution
  • System DesignMediumModel answer
    Shared Task Board with Live Sync: Architecture Walkthrough

    Design a backend for team task lists where members add, assign, schedule, reorder and complete items, with changes appearing live across web and mobile and surviving offline use.

    System Designsystem-designreal-time-syncconcurrencycrdt
  • BehavioralMediumModel answer
    Behavioral Prep: Project Stories and Team Lead Scenarios

    Build structured answers about your best and hardest projects, what you'd redo, handling a difficult teammate, and splitting work as a lead.

    BehavioralbehavioralleadershipSTARconflict-resolution
  • System DesignHardModel answer
    Build a Fault-Tolerant Block Store for Massive Tabular Datasets

    Design a distributed block-based file store for huge structured datasets, covering versioned metadata, caching, replica repair, locality-aware job scheduling, and resource-aware balancing.

    System Designdistributed-storagereplicationmetadatacaching
  • BehavioralMediumModel answer
    Winning a Technical Disagreement Without Damaging the Relationship

    Tell a structured story about a real disagreement where you thought your approach was better, how you built agreement, and what you learned, while keeping the working relationship intact.

    Behavioralbehavioralconflict-resolutioninfluencestakeholder-management
  • Data Structure DesignMediumModel answer
    Singleton, Factory Method and Strategy: Code and Compare in Java

    Write Java versions of a lazy thread-safe Singleton, a Factory Method and a Strategy, weigh them against each other, then refactor a Singleton dependency to use injection.

    Data Structure Designdesign-patternsjavasingletonfactory-method
  • System DesignHardModel answer
    Moving a Payroll Engine Off a Legacy Platform Safely

    Plan the move of a regulated payroll function from an old on-prem system to a new platform, covering rollout strategy, data checks, parallel runs, cutover, rollback and communication.

    System Designdata-migrationpayrollrisk-managementcutover-planning
  • Machine LearningHardModel answer
    Targeting Discounts with Causal ML on Logged Data

    Design a causal ML pipeline that learns who should receive a standing promotion from observational logs, covering estimators, overlap, off-policy evaluation, fairness and a safe rollout.

    Machine Learningcausal-inferenceuplift-modelingoff-policy-evaluationdoubly-robust
  • Machine LearningHardModel answer
    Fix a Broken From-Scratch Extra-Trees Forest in NumPy

    Debug a NumPy random-split decision-tree ensemble that crashes on constant columns and returns wrong shapes, until it matches scikit-learn's accuracy.

    Machine Learningdebuggingextra-treesrandom-forestnumpy
  • Data Structure DesignMediumModel answer
    In-Memory Ledger with Ranking by Total Money Sent

    Build an in-memory ledger supporting account creation, deposits and transfers, plus a query returning the top n senders by cumulative outgoing amount with deterministic tie-breaking.

    Data Structure Designdata-structure-designhash-mapheaptop-k
  • System DesignHardModel answer
    Per-User Credit Ledger Ordered by Vector-Clock Expiry

    Design a service that adds expiring credits and spends them earliest-expiry-first, where expiry and spend times are vector clocks that are only partially ordered.

    System Designvector-clocksidempotencyconcurrency-controlordered-set
  • BehavioralMediumModel answer
    Resolving a Clash Between Two Colleagues: Method and Story

    Explain how you handle a situation where two people hold opposing views, and ground your method in a specific episode from your own work, including the outcome and lessons.

    Behavioralbehavioralconflict-resolutioncommunicationcollaboration
  • Machine LearningMediumModel answer
    Choosing Between a Linear Classifier and a Forest on Small Data

    Discuss when a regularized linear probabilistic classifier beats a bagged tree ensemble on a small binary task, and how it compares with boosting.

    Machine Learninglogistic-regressionrandom-forestregularizationoverfitting
  • BehavioralEasyModel answer
    Six Behavioral Prompts for a Banking Tech Internship Screen

    Draft concise, structured answers to six common behavioral prompts for a finance-technology internship: motivation, commitments, teamwork, decisions, initiative, and staying current.

    BehavioralbehavioralSTAR methodinternshipmotivation
  • StringsMediumModel answer
    Repair a Rewards Calculator: Three Red Tests in a Java Service

    Diagnose and fix three failing JUnit tests in a Java rewards service by touching at most three files, then explain how to keep similar bugs from coming back.

    Stringsjavadebuggingunit-testingjunit
  • BehavioralMediumModel answer
    Walk Through a Component You Designed and Are Proud Of

    Present one piece of code you built, covering its API, protected invariants, test strategy, and why it beat the obvious approach, with depth beyond a simple project recap.

    Behavioralbehavioralapi-designinvariantstesting
  • Machine LearningHardModel answer
    Defending Your ML Project and Explaining Diffusion Model Design

    Present one of your own ML research projects so it survives repeated probing on model choices and coding practice, then explain how diffusion models are trained, built, conditioned and sampled.

    Machine Learningdiffusion-modelsresearch-communicationgenerative-modelsddpm
  • Statistics & ExperimentsMediumModel answer
    Early Attrition Metrics and a Guided Onboarding A/B Test

    Critique a "no first payroll in 30 days" churn definition for a B2B payroll product, handle late returners, and design a business-level A/B test for a new guided onboarding flow.

    Statistics & Experimentsab-testingchurnmetric-designsurvival-analysis
  • Stacks & QueuesMediumModel answer
    Predicting Output Order with the Browser Event Loop

    Work out the print order of a short script mixing timers, promises and microtasks, then explain how the browser event loop schedules each kind of task.

    Stacks & Queuesjavascriptevent-loopasyncmicrotasks
  • Data Structure DesignHardModel answer
    Crash-Safe Job Dispatcher with Lease Timeouts and Dependency Graphs

    Build an in-memory job dispatcher where workers hold timed leases, stale workers are fenced off, jobs form a dependency DAG, and you justify the delivery guarantees.

    Data Structure Designleasesfencing-tokensdagtopological-sort
  • System DesignMediumModel answer
    Durable, Ordered Messaging Backend for 1:1 and Group Chat

    Design a messaging backend where an acknowledged message is never lost, each conversation has a deterministic order, and reconnecting clients catch up without gaps or duplicates.

    System Designmessagingdurabilityorderingfan-out
  • Statistics & ExperimentsMediumModel answer
    Estimating Sign-up Lift from a Two-City Outdoor Ad Launch

    Design a causal study to measure how much a 30-day outdoor ad push in two metros raised new registrations, covering control selection, confounders, spillover, and validation of a 5% lift.

    Statistics & Experimentscausal-inferencesynthetic-controldifference-in-differencesgeo-experiment
  • Arrays & HashingMediumModel answer
    Randomly Fill Ad Slots Under Per-User View Caps

    Randomly assign eligible ads to page positions for one user, respecting per-user display caps, avoiding repeats when possible, and returning the updated view counts.

    Arrays & Hashingrandomizationhash-mapshuffleresource-allocation
  • Greedy & IntervalsHardModel answer
    Payroll From an Event Log With Surge Windows

    Turn a day's delivery events into total driver pay, then add doubled-rate surge windows by splitting intervals at boundaries, and decide how to handle messy or inconsistent logs.

    Greedy & Intervalsintervalsevent-processinghashingsorting