KatInterview

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

Interview Practice Problems

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

6093
Problems
2258
Auto-graded
15
Topics
275
Added today

Showing 3841–3870 of 6093 results

  • Machine LearningEasyModel answer
    ML Fundamentals: Bayes, Neural Nets, KNN, and Transformers

    Work through four sets of ML fundamentals: a Bayes' rule posterior with a rare event, neural network arithmetic, KNN concept checks, and Transformer mechanics.

    Machine Learningbayes-theoremneural-networksknntransformers
  • Greedy & IntervalsMediumModel answer
    Minimum Shift Count for Concurrent Task Scheduling

    Given tasks with time windows and resource demands, find the fewest parallel workers needed so no worker exceeds capacity K at any moment.

    Greedy & Intervalsgreedyintervalsheapbin-packing
  • Data Structure DesignMediumAuto-graded
    Access-Tracked Key-Value Store

    Build a dictionary that counts how many times each key has been retrieved, testing hash map design and state management.

    Data Structure Designhash-mapdesignsimulation
  • System DesignMediumModel answer
    Building a Resilient HTTP Client with Retries and Rate Limiting

    Design and implement a production-grade HTTP client that handles network failures, respects rate limits, and ensures safe retries.

    System Designapi-designerror-handlingdistributed-systems
  • Machine LearningMediumModel answer
    Designing a Churn Risk System: Classification vs. Survival

    Design an end-to-end churn prediction system for a subscription business, choosing between windowed binary classifiers and time-to-event models, avoiding leakage, and turning scores into daily actions.

    Machine Learningchurn-predictionsurvival-analysisclass-imbalancedata-leakage
  • Arrays & HashingMediumAuto-graded
    Instrument-Based Estimator for a Randomized Encouragement Trial

    Tests whether a candidate can implement ITT, first-stage, and IV/Wald (LATE) estimators from a randomized encouragement design, including a balance check on pre-treatment activity.

    Arrays & Hashingcausal-inferencea-b-testinginstrumental-variables
  • Data Structure DesignMediumModel answer
    In-Memory Grid with Formula Evaluation and Cycle Guards

    Build a spreadsheet class in three stages: plain integer cells, formula parsing with dependency-order evaluation, then cycle detection and targeted recomputation.

    Data Structure Designgraphsdependency-trackingparsing
  • System DesignMediumModel answer
    Double-Entry Ledger with Account Consolidation

    Design an ACID, idempotent, sharded banking ledger that supports transfers, paginated history, and merging one account into another under concurrent traffic.

    System Designsystem-designdistributed-systemstransactionsidempotency
  • Data Structure DesignHardModel answer
    Peak Concurrent Couriers Over a Rolling 24-Hour Window

    Design a data structure that records courier delivery intervals and efficiently answers: what is the highest number of couriers simultaneously active at any instant in the last 24 hours?

    Data Structure Designsegment-treeintervalssliding-windowonline-algorithms
  • SQL & DataMediumModel answer
    Daily Ledger Reconciliation with FX Rates and Late Postings

    Build SQL reconciliation across two ledgers with as-of FX conversion, 48h late-arrival classification, an idempotent backfilling pipeline, and honest discrepancy reporting.

    SQL & Datasqldata-engineeringwindow-functionsetl
  • Machine LearningHardModel answer
    End-to-End Personalized Ranking System: From Logs to Live Serving

    Design a full recommendation pipeline covering data ingestion, feature engineering, model training and refresh, multi-stage serving architecture, and production reliability.

    Machine Learningrecommendation systemsfeature storestwo-tower modelA/B testing
  • System DesignMediumModel answer
    Real-Time Ranking System for Competitive Programming Platform

    Design a leaderboard that tracks millions of users' scores and serves rankings with sub-100ms latency at 50K writes/sec.

    System Designleaderboardredisshardinghigh-throughput
  • Data Structure DesignMediumAuto-graded
    Round-Robin Load Balancer with Capacity and Shutdown

    Tests stateful system simulation with round-robin target selection, connection lifecycle tracking, capacity enforcement, and target shutdown with eviction ordering.

    Data Structure Designsimulationhash-tableround-robinstateful
  • BehavioralMediumModel answer
    Behavioral Interview: Ownership, Conflict, and Trade-offs

    Demonstrate ownership, collaboration, risk awareness, and learning through structured responses to common behavioral questions in a technical setting.

    Behavioralbehavioralleadershipcommunication
  • BehavioralMediumModel answer
    Workplace Ethics: Selecting Appropriate Professional Responses

    Evaluate professional scenarios and identify the most appropriate and least appropriate courses of action based on ethical principles and workplace conduct.

    Behavioralethicsprofessionalismjudgmentsituational-awareness
  • System DesignHardModel answer
    Telemetry Pipeline Design for High-Frequency Robotics Fleet Data

    Design an end-to-end pipeline to ingest, validate, store, and query multi-modal sensor streams from a large fleet of autonomous robots at 20 GB/s aggregate throughput.

    System Designstreamingtime-seriesdata-pipelinestorage-tiering
  • Machine LearningHardModel answer
    Embedding Similarity: Top-K Retrieval and Evaluation

    Implement cosine-similarity ranking over a set of candidate embeddings, handle edge cases explicitly, and reason through how you would evaluate whether the results are actually useful.

    Machine Learningembeddingssimilarityevaluationpython
  • Machine LearningHardModel answer
    Build a GLM from Scratch: Family, Link, and Optimizer

    Design and implement a generalized linear model end-to-end, covering family and link selection, loss derivation, numerical stability, and prediction semantics.

    Machine Learninggeneralized-linear-modelsmaximum-likelihoodnumerical-stability
  • System DesignMediumModel answer
    Build a link shortener with unique codes and fast redirect

    Design a service that converts long URLs into compact codes and serves redirects at high throughput with low latency.

    System Designurl-shortenerdistributed-systemscachingscalability
  • System DesignHardModel answer
    Multi-Channel Messaging Platform Design

    Build a platform that routes millions of messages per day across email, SMS, and mobile push, handling both real-time triggers and scheduled campaigns.

    System Designdistributed-systemsmessagingscalabilityqueues
  • Machine LearningMediumModel answer
    Debugging an Input-Starved Training Pipeline

    Diagnose stalled GPU utilization across storage, CPU transforms, and transfer, then design a bounded, reproducible prefetch pipeline.

    Machine Learningdata-loadinggpu-utilizationperformancetraining-infrastructure
  • System DesignMediumModel answer
    Build a Multi-User Prompt Editor with Versioning and Execution

    Design a system where teams edit prompts collaboratively, snapshot immutable versions, run them against LLMs, and trace results back to exact inputs.

    System Designcollaborationversioningasync-execution
  • System DesignHardModel answer
    Real-Time Sliding Window Visit Counter

    Design a system that tracks website page views over a rolling 60-second window and serves the current count with low latency at high traffic volumes.

    System Designstreamingrediskafkarate-limiting
  • Statistics & ExperimentsMediumModel answer
    Estimate Pi Empirically with Minimal Tools to Six Decimal Places

    Design a die-and-cardboard Monte Carlo experiment that estimates π, then derive how many trials five to six correct decimal places demand and how to realistically get there.

    Statistics & Experimentsmonte-carloprobabilityvariance-reductionerror-analysis
  • Statistics & ExperimentsMediumModel answer
    Rare-Event AV Safety Estimation with Importance Sampling

    Design a biased-sampling simulation study that estimates a ~1-in-10,000-mile collision rate within a 50k-run budget, reports calibrated uncertainty, and validates the extrapolation.

    Statistics & Experimentsimportance-samplingrare-eventsvariance-reductionsimulation
  • BehavioralMediumModel answer
    Using AI Tools in Your Workflow and Delegating to Autonomous Agents

    Describe how you incorporate AI tooling into daily engineering work and explain when you would trust an autonomous agent to execute tasks on your behalf.

    Behavioralai-toolsengineering-judgmentrisk-assessment
  • System DesignMediumModel answer
    Design a Secure Multi-Region Log Aggregation Pipeline

    Design a system that collects, encrypts, and stores logs from distributed edge nodes into centralized storage while ensuring confidentiality and integrity.

    System Designdistributed-systemssecurityencryptiondata-pipeline
  • Machine LearningMediumModel answer
    From Demonstrations to Preferences: SFT, DPO and PPO Compared

    Explain SFT's token-likelihood objective, DPO's pairwise log-ratio loss, and how PPO fits into KL-regularized post-training.

    Machine Learningpost-trainingDPOPPOSFT
  • Statistics & ExperimentsEasyModel answer
    Picking Classification Metrics for an Imbalanced Medical Test

    Choose and justify evaluation metrics for a rare-disease screening model where false negatives and false positives carry very different costs.

    Statistics & Experimentsclassificationmetricsclass-imbalanceconfusion-matrix
  • Data Structure DesignMediumAuto-graded
    Disjoint Set: Merge Nodes and Query Connectivity

    Tests ability to implement Union-Find with union by rank and path compression, supporting merge, connectivity, and component-count queries.

    Data Structure Designunion-finddisjoint-setgraphdata-structure-design