KatInterview

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

Interview Practice Problems

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

6083
Problems
2255
Auto-graded
15
Topics
274
Added today

Showing 4021–4050 of 6083 results

  • 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
  • Math & Bit ManipulationMediumAuto-graded
    Decode a Mixed-Radix Positional Number

    Tests the ability to convert a number represented in a variable base-per-digit (mixed-radix) system back to its standard base-10 integer value.

    Math & Bit Manipulationmathbase conversionnumber theory
  • 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
  • StringsMediumAuto-graded
    Longest Shared Leading-Digit Sequence Between Two Integer Lists

    Tests whether a candidate can avoid brute-force pair comparison by exploiting bounded digit counts to match prefixes efficiently with a hash set.

    Stringsstringsarrayshashing
  • 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
  • Arrays & HashingMediumAuto-graded
    Session-Based Account Risk Scoring with Bayesian Updates

    Tests probabilistic modeling with the Binomial distribution, Bayes' theorem, two-stage classification pipelines, and F1-optimal threshold selection in a risk-scoring context.

    Arrays & Hashingprobabilitybayes-theorembinomial-distribution
  • 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
  • Arrays & HashingMediumAuto-graded
    Compute Correlation from Three Variance Values

    Tests whether a candidate can apply the variance-of-a-sum identity to extract correlation, and correctly handle the case where one variance is missing.

    Arrays & Hashingstatisticsmathprobability
  • 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
  • Trees & GraphsHardAuto-graded
    Shortest Supplier Chain Between Two Vendors

    Tests BFS-based shortest-path traversal on an undirected graph, including path reconstruction and degree-of-separation counting with correct edge-case handling.

    Trees & GraphsgraphsBFSshortest-path
  • 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