KatInterview

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

Interview Practice Problems

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

6056
Problems
2241
Auto-graded
15
Topics
273
Added today

Showing 2311–2340 of 3815 results

  • Arrays & HashingMediumModel answer
    Writing Test Cases for Array and String Problems

    Design a systematic testing strategy for array and string coding problems, covering edge cases, validation, and stress testing.

    Arrays & Hashingtestingedge-casesdebugging
  • Data Structure DesignMediumModel answer
    Build a Stack That Also Tracks and Removes the Maximum

    Design a stack supporting push, pop, top, peekMax, and popMax, with two implementations trading off simplicity against O(log n) worst-case popMax.

    Data Structure Designstackheaplinked-listamortized-complexity
  • System DesignMediumModel answer
    Real-Time Risk Enforcement for Order Submission

    Build a low-latency system that validates trading orders against risk limits before they leave your network, with atomic resource tracking.

    System Designlow-latencyconcurrencyfinancial-systems
  • Statistics & ExperimentsHardModel answer
    Diagnose a Dinner-Peak Order Slump and Design a Supply Experiment

    Decompose a sudden completed-order drop in a delivery marketplace, isolate the supply-side driver, and design a rigorous experiment to validate and fix it.

    Statistics & Experimentsexperimentationfunnel-analysismarketplacecausal-inference
  • System DesignMediumModel answer
    HTTP API Design for Binomial Coefficient Sequences

    Design a clean HTTP API that delivers row-by-row binomial coefficients, covering endpoint structure, validation, error contracts, and numeric limits.

    System Designapi-designhttpvalidationerror-handling
  • Machine LearningHardModel answer
    Build an End-to-End Response Ranking System for a Chat Assistant

    Design a full ML pipeline that scores and ranks N candidate responses per user query, covering labeling, modeling, serving, evaluation, and monitoring.

    Machine Learningrankingreward-modelingRLHFml-system-design
  • Machine LearningMediumModel answer
    Diagnosing and Fixing a Train–Test Performance Gap

    Given a supervised model that scores much higher on training data than on held-out data, explain the bias-variance trade-off and work through a systematic plan to close the gap.

    Machine Learningoverfittingbias-varianceregularizationcross-validation
  • Statistics & ExperimentsHardModel answer
    Diagnosing a Sudden 20% Revenue Decline

    Break a 20% weekly revenue drop into traffic, conversion and basket effects, add returns and stockout losses, then design causal tests to separate overlapping shocks.

    Statistics & Experimentscausal-inferencerevenue-decompositiondifference-in-differencesdiagnostic-analytics
  • Machine LearningHardModel answer
    Design a Personalized Feed Recommendation Engine

    Design an end-to-end recommendation system for a large e-commerce platform, covering data pipelines, candidate retrieval, ranking, cold start, and evaluation.

    Machine Learningrecommendation systemsML system designtwo-tower modelcandidate retrieval
  • BehavioralMediumModel answer
    Making Product Decisions With Incomplete or Conflicting Data

    Walk through how you structure a product decision using metrics, experiments, qualitative signals, and judgment when the data picture is unclear or imperfect.

    Behavioralproduct thinkingdecision makingmetricsexperimentation
  • Machine LearningMediumModel answer
    Build a Scaled Dot-Product Multi-Head Attention Block

    Write a PyTorch multi-head self-attention module that projects, splits into heads, attends, merges, and projects back to the input shape.

    Machine Learningpytorchattentiontransformerstensor-shapes
  • BehavioralEasyModel answer
    Walk Me Through Your Technical Stack

    Describe your programming languages, libraries, and dev tooling by proficiency tier, then tie the stack to a concrete, measurable outcome.

    Behavioraltoolinglanguagesengineering fundamentalsHR screen
  • System DesignMediumModel answer
    Scalable Duplicate File Detection in a Large Directory Tree

    Design and implement an algorithm to find (and safely remove) duplicate files in a directory tree that may exceed available memory.

    System Designhashingfile-systemsdeduplicationscalability
  • Machine LearningMediumModel answer
    End-to-End Classification: Text Features, Ensembles, and CTR

    Walk through a full supervised ML lifecycle covering bag-of-words pipelines, OOB validation, CTR modeling from data to deployment, and debugging a model that degrades in production.

    Machine Learningclassificationfeature-engineeringctr-predictionrandom-forests
  • System DesignMediumModel answer
    Design a GPU-Backed Video Generation Service with Fair Scheduling

    Design the backend for a text-to-video service where each job occupies exactly one GPU, covering task lifecycle, fair multi-user queueing, and cancellation at every stage.

    System Designsystem-designqueuesdistributed-systems
  • Statistics & ExperimentsHardModel answer
    No-Holdout Launch: Judging a Watch-Time Regression

    Decide whether to roll back, continue, or mitigate a 100%-rollout ranking change when a 2.7% watch-time drop coincides with a premiere and an outage, using DiD and synthetic control.

    Statistics & Experimentscausal-inferencedifference-in-differencessynthetic-controlexperiment-design
  • Machine LearningMediumModel answer
    Probability Calibration via Temperature Scaling: Derive and Code It

    Derive the NLL gradient with respect to a single temperature scalar, then implement a numerically stable optimizer and calibrated inference function in Python.

    Machine Learningcalibrationsoftmaxgradient-descentdeep-learning
  • BehavioralEasyModel answer
    Handling Critical Deliverables with Constrained Timelines

    Explain how you managed a project with insufficient time, covering scope decisions, stakeholder alignment, quality assurance, and debt resolution.

    Behavioralprioritizationrisk-managementcommunicationproject-management
  • BehavioralEasyModel answer
    Navigating PM and Eng as a Data Scientist

    Show how you structure cross-functional work, decide when to push back, and use data to steer a product decision.

    Behavioralcollaborationstakeholder-managementinfluenceexperimentation
  • System DesignHardModel answer
    Design a Fair, Real-Time Pricing Engine for a Ride Platform

    Design the components, data flows, and core pricing logic for a ride platform that handles surge, carpooling, fairness constraints, and live experimentation at scale.

    System Designpricingreal-time systemssurgecarpooling
  • Machine LearningMediumModel answer
    Feature Selection Mechanism in L1-Regularized Regression

    Explain how and why L1 regularization drives coefficients to exactly zero, covering mathematical foundations, practical implications, and trade-offs.

    Machine Learningregularizationfeature-selectionlassooptimization
  • Statistics & ExperimentsHardModel answer
    Designing Experiments for a New Group Video Feature

    Design surveys, benchmark competitors indirectly, plan an A/B test with appropriate metrics, and handle network interference when launching group calling.

    Statistics & Experimentsexperiment-designcausal-inferencemetricssurvey-design
  • Machine LearningHardModel answer
    Building and Evaluating a Personalized Content System

    Walk through how you designed a personalized content system: what signals defined user interest, how you represented content and users, and how you validated that model updates actually improved outcomes.

    Machine Learningembeddingslabelingmodel-evaluationproduction-ml
  • BehavioralMediumModel answer
    Self-Description, Goal-Setting, Paper Review, and Competition Retrospective

    Craft structured behavioral answers covering your professional identity, how you plan goals, a research paper you studied, and what a stronger competitor taught you.

    Behavioralself-awarenessgoal-settingresearch literacygrowth mindset
  • BehavioralMediumModel answer
    Leading a Cross-Functional ML Recommendation System Initiative

    Describe how you would plan, staff, execute, and measure a large-scale recommendation project across engineering, product, and data science teams.

    Behavioralleadershipproject-planningcross-functionalml-systems
  • Statistics & ExperimentsHardModel answer
    Measuring the Impact of a Delivery Fee Promotion

    Design an experiment to evaluate whether offering reduced delivery fees drives profitable growth and determine which customer segments benefit most.

    Statistics & Experimentsexperimentationcausal-inferencecustomer-segmentation
  • System DesignMediumModel answer
    Designing a Real-Time and Batch Device Telemetry Pipeline

    Architect an ingest-to-query system that handles millions of device messages per second while serving both sub-second dashboards and long-range batch analytics.

    System Designdistributed-systemsstream-processingdata-pipelinetime-series
  • Machine LearningHardModel answer
    Build a Bagging Ensemble Classifier from Scratch

    Implement bootstrap sampling, multi-tree training, and majority-vote aggregation for a bagging classifier using only Python lists and the standard library.

    Machine Learningensemble learningdecision treesbootstrap sampling
  • StringsMediumModel answer
    Aggregate HTTP Logs to Identify Top Client Addresses

    Parse multi-file request logs to extract and rank the five IPv4 addresses that generated the most completed HTTP requests.

    Stringsparsingregexaggregationtop-k
  • System DesignHardModel answer
    Multi-Level Parking Facility: Allocation, Ticketing, and Payments

    Design a multi-level parking facility with typed spots, entry/exit gates, ticketing, pricing, and availability — covering concurrency, consistency, and failure handling.

    System Designsystem-designconcurrencyidempotencystate-machines