KatInterview

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

Interview Practice Problems

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

6043
Problems
2238
Auto-graded
15
Topics
274
Added today

Showing 2521–2550 of 3805 results

  • StringsMediumModel answer
    Rule Engine with Operator Precedence and Quoted Strings

    Build a transaction filter that evaluates accept/block rules in sequence, supporting field equality, boolean logic, AND/OR operators, and parentheses.

    Stringsparsingstring-matchingoperator-precedencetokenization
  • BehavioralMediumModel answer
    Building a Trustworthy AI Feature for Real Customer Impact

    Demonstrate how you identified a customer problem, deployed an AI solution responsibly, verified its outputs, and made the improvement last.

    BehavioralAI/MLownershipverificationcustomer impact
  • System DesignHardModel answer
    Design a Real-Time Streaming VWAP Computation Service

    Design a sub-5ms latency pipeline that ingests multi-exchange trade ticks, maintains running VWAP aggregates with correction support, and fans out to tens of thousands of subscribers.

    System Designstreamingfinancial-datalow-latencypub-sub
  • SQL & DataMediumModel answer
    Hourly Click-Through Rate and Local Revenue by Country

    Calculate hourly CTR and currency-adjusted revenue per country from event logs, joining latest exchange rates and handling time bucketing and safe division.

    SQL & Dataaggregationjoinswindow-functionsdate-time
  • System DesignMediumModel answer
    C++ Memory Semantics, Dynamic Dispatch, and Override Pitfalls

    Explain pointers vs references, vtable-based dispatch internals, and the override specifier, then diagnose three bugs in a polymorphic sensor class hierarchy.

    System Designc++polymorphismmemory-management
  • Machine LearningHardModel answer
    Transformer Attention: Math, Caching, Precision, and Masking Trade-offs

    Walk through scaled dot-product attention, KV-cache memory and complexity, mixed-precision training with loss scaling vs BF16, and masked vs cross-attention design choices.

    Machine Learningtransformersattentionkv-cachemixed-precision
  • Statistics & ExperimentsMediumModel answer
    Build a Mean-Variance Objective for a Single-Period Portfolio

    Derive and explain the classic mean-variance trade-off objective, covering term definitions, units, risk-aversion role, and convexity conditions.

    Statistics & Experimentsportfolio optimizationconvex optimizationmean-variancequadratic programming
  • Arrays & HashingMediumModel answer
    Three-Problem Algorithmic Challenge Set

    Solve three independent problems: tournament match counting, grid traversal with movement commands, and finding maximum sum of digit-disjoint pairs.

    Arrays & Hashingsimulationgraph-traversalbit-manipulationdfs
  • StringsMediumModel answer
    Build a CSV Parser from Scratch with Corruption Handling

    Write a from-scratch CSV tokenizer and data structure for downstream consumers, then extend it to handle rows with missing or extra fields.

    Stringsparsingcsvstring-manipulationerror-handling
  • BehavioralHardModel answer
    Navigating Feedback, Disagreement, and Engineering Motivation

    Demonstrate technical ownership, conflict resolution, receptivity to criticism, and authentic career drivers through detailed examples.

    Behavioralleadershipcommunicationconflict-resolution
  • Statistics & ExperimentsMediumModel answer
    Evaluate a Free-Trial A/B Test for Paid Plan Conversion

    Analyze a free-trial experiment end-to-end: compute conversion lift, test significance, measure churn, estimate net subscriber change, and make a launch decision.

    Statistics & Experimentsa/b testinghypothesis testingchurn analysisexperimentation
  • Statistics & ExperimentsMediumModel answer
    Modeling Rare-Event Counts with Log-Linear Models

    Design a statistical model for rare-event count data using a log link, handle zero observations, and address overdispersion and exposure.

    Statistics & Experimentsstatisticsmodelinggeneralized-linear-models
  • Data Structure DesignMediumModel answer
    Build a Weighted Consistent Hash Ring

    Design and code a hash ring that maps keys to servers with virtual nodes, supporting weighted capacity and minimal key movement on topology changes.

    Data Structure Designhashingdistributed-systemsdata-structuresbinary-search
  • BehavioralMediumModel answer
    Lead a Team Through a Mid-Project Crisis

    Show how you handled a major mid-project risk, reprioritized under resource constraints, ran a blameless post-mortem, and kept your team healthy throughout.

    Behavioralleadershipcrisis managementprioritizationpost-mortem
  • Statistics & ExperimentsHardModel answer
    Assess a Chat App's In-App Payment Feature for Business Fit

    Evaluate whether a messaging platform should add peer-to-peer payments, then define metrics, risks, monetization paths, and a rigorous experiment design.

    Statistics & Experimentsexperimentationproduct-analyticscausal-inferencemetrics
  • BehavioralMediumModel answer
    Managing Cross-Team Delivery When the Goal Is Unclear

    Describe a situation where you led an initiative with vague requirements and multi-team dependencies, explaining how you clarified the goal and delivered the outcome.

    Behavioralleadershipcross-functionalambiguityexecution
  • SQL & DataMediumModel answer
    Daily and Category-Level New Customer Purchase Rate

    Flag each order as a customer's first in a category or overall, then aggregate to compute new-buyer proportions by day and category.

    SQL & Datasqlpandaswindow-functionsaggregation
  • System DesignHardModel answer
    Build a Reusable Thread Rendezvous Point from First Principles

    Implement a cyclic barrier from a mutex and condition variables where N threads block until all arrive, then release together and reset for the next round.

    System Designconcurrencysynchronizationthreadingmutex
  • BehavioralEasyModel answer
    Recruiter Screen: Background, AI Usage, Values Conflicts, and Company Motivation

    A short HR screen asks you to introduce yourself, describe how you use AI at work, handle partnering with a company you disagree with, and explain your interest in the company.

    Behavioralbehavioralrecruiter-screenprofessional-judgmentai-in-practice
  • SQL & DataHardModel answer
    Reconstruct the Latest State of Every Listing

    Query an event-log table to produce one row per listing showing its most recent status and total lifespan in hours.

    SQL & Datawindow-functionsaggregationtimestamp-arithmetic
  • System DesignHardModel answer
    Design a Query-Driven Feed Ranking System with Ad Insertion

    Design a low-latency pipeline that blends organic search results with sponsored content, balancing user engagement and revenue at 50k QPS.

    System Designrankingadssearchmulti-stage-funnel
  • System DesignHardModel answer
    Windowed Aggregation Pipeline for Calendar Event Logs

    Design a Spark/MapReduce pipeline that computes rolling 15-minute concurrent meeting counts and room utilization from a large-scale event log.

    System Designbig-datasparkmapreducewindowed-aggregation
  • Machine LearningMediumModel answer
    Build a Click-Through Rate Model for a News Feed

    Design an end-to-end CTR prediction pipeline covering temporal feature engineering, leakage prevention, high-cardinality encoding, and offline-to-online metric gaps.

    Machine Learningfeature-engineeringdata-leakagehigh-cardinalitymodel-evaluation
  • Data Structure DesignMediumModel answer
    Dependency-Aware Job Scheduler with Priority Queues

    Build an in-memory scheduler that tracks job prerequisites, selects the next runnable job by a four-field priority rule, supports filtered queries, and detects deadlocks.

    Data Structure Designheaptopological-sortgraphsimulation
  • BehavioralMediumModel answer
    Articulating Your Data Science Journey and Role Fit

    Craft a focused narrative connecting your background to the target role through one impactful project with measurable outcomes.

    Behavioralcommunicationcareer-narrativeimpact-demonstration
  • System DesignHardModel answer
    Design a Governed AI Agent for Automated Trade Execution

    Design a safety-first, ML-driven order generation system with deterministic validation gates, idempotent execution, and a fully replayable audit trail.

    System Designagentic-systemsfinancial-infrastructurerisk-managementaudit-logging
  • Data Structure DesignMediumModel answer
    Continuous-Batch Inference Loop with Slot Refilling

    Implement a dynamic batching generation loop that keeps a fixed-size batch full by refilling completed slots from a waiting queue until all requests are served.

    Data Structure Designbatchinginferencesimulationqueue
  • Statistics & ExperimentsMediumModel answer
    Measure Whether a New Revenue Channel Cannibalizes Existing Ones

    Design a causal analysis to determine whether revenue growth in one channel comes at the expense of other channels or represents genuine incremental growth.

    Statistics & Experimentscausal inferenceexperimentationrevenue analysisdifference-in-differences
  • System DesignHardModel answer
    Year-Long Ad Click Aggregation with External Logging Integration

    Design an aggregator that answers queries over a rolling one-year window of ad clicks, ingesting from an existing logging API rather than a real-time stream.

    System Designaggregationdata-pipelinestimeseriesdeduplication
  • BehavioralMediumModel answer
    Staff Behavioral: Uncertainty, Competing Stakeholders, Scaling Your Influence

    Three structured story prompts testing judgment under ambiguity, cross-functional alignment without authority, and how you grow engineers and extend technical impact at staff scope.

    Behavioralstaff-engineerleadershipinfluence-without-authoritymentoring