KatInterview

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

Interview Practice Problems

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

6094
Problems
2258
Auto-graded
15
Topics
271
Added today

Showing 2191–2220 of 6094 results

  • SQL & DataMediumModel answer
    Trailing Week Totals of Voice Assistant Replies per Device

    Write a query that gives each device's total replies over the current day and the six days before it, handling duplicate rows and missing dates correctly.

    SQL & Datasqlwindow-functionstime-seriespandas
  • Data Structure DesignMediumModel answer
    Build a Weekly Schedule Grid

    Construct an interactive 7-day schedule grid with hour slots, allowing users to add titled events via a clean, state-driven dialog without duplicate data sources.

    Data Structure Designfrontendreactstate-managementui-components
  • Arrays & HashingEasyAuto-graded
    Calculate Sample Size per Variant for A/B Testing

    Compute the minimum sample size required per group for a two-sample z-test given standard deviation, MDE, power, and significance level.

    Arrays & Hashingstatisticsa-b-testinghypothesis-testingmath
  • Machine LearningMediumModel answer
    LLM Systems Quick-Fire: Optimization, Evaluation, and Quantization

    Answer four high-frequency technical questions on LLM inference optimization, evaluation for tool use, and quantization trade-offs.

    Machine LearningLLMInference OptimizationKV CacheQuantization
  • Data Structure DesignMediumAuto-graded
    Simulate a Ring Buffer Queue from a Command Log

    Replay a list of queue commands against a bounded ring buffer, returning each command's result while handling wrap-around, full and empty states correctly.

    Data Structure Designcircular-queuering-buffersimulationmodular-arithmetic
  • Heaps, Sorting & SearchMediumAuto-graded
    Generate Unique Lexicographical Permutations

    Enumerate all unique permutations of an integer list containing duplicates in lexicographically sorted order.

    Heaps, Sorting & Searcharrayssortingbacktrackingrecursion
  • Arrays & HashingMediumAuto-graded
    Fit a Line by Full-Batch Gradient Descent on Squared Error

    Implement full-batch gradient descent for a one-feature linear model, using gradients from the old parameters at every step to update the slope and intercept together.

    Arrays & Hashinggradient-descentlinear-regressionnumericalsimulation
  • Trees & GraphsMediumModel answer
    Analyze Referral Chains and Detect Graph Cycles

    Process referral relationships with at most one parent per user. Detect cycles, extract acyclic prefixes, and compute root ancestors and depths for all users in O(n) total time.

    Trees & Graphstrees-graphsdfscycle-detectiongraph-traversal
  • Arrays & HashingEasyAuto-graded
    Static Array Range Sum Queries

    Process a sequence of range sum queries on an immutable array efficiently using prefix sums.

    Arrays & Hashingarraysprefix-sumdata-structures
  • Machine LearningMediumModel answer
    Build a Centroid-Based Point Grouper Using Numpy

    Write a vectorized k-means routine that groups N points into k clusters by alternating nearest-centroid assignment with mean updates, handling empty clusters and convergence.

    Machine Learningk-meansclusteringnumpyunsupervised-learning
  • System DesignHardModel answer
    Building a Copy-Detection Pipeline for Massive Photo and Video Libraries

    Design a platform that finds re-uploaded or lightly edited photos and videos across billions of items, covering fingerprinting, indexing, match thresholds, evaluation and abuse resistance.

    System Designnear-duplicate-detectionperceptual-hashingembeddingsann-search
  • BehavioralMediumModel answer
    Driving a Cross-Team Decision When You Don't Own the Call

    Describe a time you changed a cross-functional decision without formal authority, covering how you built buy-in, handled resistance, and what measurable result followed.

    Behavioralbehavioralinfluencestakeholder-managementSTAR
  • Trees & GraphsMediumAuto-graded
    Perform Connected Component Recolor on Grid

    Perform a flood-fill recoloring on a 2D integer grid while avoiding call stack overflow and preserving the original input.

    Trees & Graphsbfs-dfsmatrixflood-fillgraph-traversal
  • Arrays & HashingMediumAuto-graded
    Survey Click-Through and Score Averages from Impression Logs

    Group survey impression records to compute a click rate, a plain score average, and an average of each user's earliest score per survey, with careful handling of missing values.

    Arrays & Hashinghash-mapgroupingsortingnull-handling
  • BehavioralMediumModel answer
    Hardest Technical Call: A Two-Project Retrospective

    Describe the toughest technical decision from each of two different projects, covering options, trade-offs, validation, and what you would change in hindsight.

    Behavioralbehavioraltechnical-decisionstrade-offsretrospective
  • Statistics & ExperimentsEasyModel answer
    Statistical Inference & A/B Testing Fundamentals

    Answer core statistical questions on the Central Limit Theorem, error types, p-values, and confounding variables in product experimentation.

    Statistics & ExperimentsA/B TestingHypothesis TestingCentral Limit TheoremCausal Inference
  • StringsMediumModel answer
    Validate Palindrome Rearrangements and Sum High-Precision Decimals

    Check if a string's characters can form a palindrome, and implement precise addition of non-negative decimal strings without using native floating-point types.

    Stringsstringsmath-bitshash-table
  • SQL & DataMediumModel answer
    Video Call Metrics: Regional Reach and Per-User Talk Time

    Write two SQL queries over daily call and profile tables: the share of French users on a call yesterday, and total U.S. call time divided by the number of U.S. daily-active users today.

    SQL & Datasqljoinsaggregationdeduplication
  • System DesignHardModel answer
    Build a Self-Destructing Inbox Platform for Throwaway Addresses

    Design a service that hands out short-lived, unguessable receive-only email addresses, ingests mail at scale, and exposes it through a web UI and API before wiping it.

    System Designsystem-designsmtpttlrate-limiting
  • BehavioralMediumModel answer
    Evaluating Language Selection in Front-End Coding Assessments

    Justify using JavaScript in front-end coding interviews, evaluating key trade-offs against TypeScript and Python across runtime quirks, data structures, and readability.

    Behavioraljavascripttypescriptpythoninterview-strategy
  • Greedy & IntervalsMediumAuto-graded
    Consolidate Overlapping Bookings in a Weekly Schedule

    Parse weekday and 24-hour time strings, then merge touching or overlapping same-day bookings and output them in a canonical, sorted string format.

    Greedy & Intervalsintervalssortingstring-parsingmerge-intervals
  • Dynamic ProgrammingMediumAuto-graded
    Cheapest Right-and-Down Route Across a Cost Map

    Compute the minimum total cost of a route through a rectangular cost grid using only right and down moves, which tests 2D dynamic programming with a space optimization.

    Dynamic Programmingdynamic-programminggridmatrixoptimization
  • Heaps, Sorting & SearchMediumModel answer
    Find Frequent Elements in Large-Scale Data Streams

    Design scalable algorithms to extract the top K most frequent elements from a data stream under both memory-bounded exact and memory-constrained approximate regimes.

    Heaps, Sorting & Searchheaps-sortingdesign-dsarrays
  • System DesignEasyModel answer
    How to Systematically Test a Mission-Critical Path Planning Service

    A guide to designing a multi-tier testing strategy, mathematical runtime invariants, and safe deployment pipelines for mission-critical spatial planning services.

    System Designsystem-designtestingreliabilitydistributed-systems
  • Trees & GraphsMediumAuto-graded
    Evaluate Variable Expressions with Dependencies

    Evaluate symbolic variable definitions with standard arithmetic precedence, resolving variable dependencies while detecting cycles and missing definitions.

    Trees & Graphstrees-graphsstacks-queuestopological-sortrecursion
  • BehavioralMediumModel answer
    Mastering Behavioral Interviews: Tech-Focused Storytelling Frameworks

    Learn how to craft high-impact behavioral answers for principles like ownership, customer obsession, and deep dives using data-driven frameworks.

    Behavioralbehavioralleadership-principlesinterview-prepcareer
  • StringsMediumModel answer
    Debugging and Hardening a Lightweight Template Engine

    Trace three root causes in a minimal template rendering engine—regex greediness, loop parsing, and path traversal—and present targeted fixes with regression tests.

    Stringsdebuggingparsingregexsecurity
  • Trees & GraphsEasyAuto-graded
    Largest Cluster of Two-Digit Numbers Linked by Common Digits

    Find the largest connected cluster in a list of two-digit numbers where links come from shared digits, testing graph connectivity modeling with union-find or digit-hub nodes.

    Trees & Graphsunion-findconnected-componentsbitmaskgraph
  • BehavioralMediumModel answer
    Navigating Critical Production Outages and Incident Response

    Demonstrate technical ownership, structured troubleshooting, stakeholder management, and preventative measures during a severe production incident.

    Behavioralbehavioralincident-responsesystem-designleadership
  • Statistics & ExperimentsHardModel answer
    Optimal Stopping on a Die Game with Square Traps

    Evaluate optimal stopping strategies and dynamic programming formulations for a die-rolling game where landing on perfect squares results in total loss.

    Statistics & Experimentsprobabilitydynamic-programmingoptimal-stoppinggame-theory