KatInterview

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

Interview Practice Problems

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

5972
Problems
2212
Auto-graded
15
Topics
273
Added today

Showing 151–180 of 5972 results

  • System DesignHardModel answer
    Architecting an Enterprise Experimentation and Feature Flag Platform

    Design a distributed, highly available A/B testing infrastructure capable of sub-millisecond variant evaluation, scale-proof event ingestion, and statistically sound automated analysis.

    System Designsystem-designab-testingdata-pipelinesdistributed-systems
  • System DesignMediumModel answer
    Building a Cited Question-Answering Service Over Text, PDFs and Images

    Design an enterprise assistant that retrieves evidence from text, PDFs and images, then generates answers with citations while respecting access controls, latency and cost limits.

    System Designragmultimodalretrievalembeddings
  • Data Structure DesignEasyAuto-graded
    Duel Resolver: Speed, Types and Chip Damage

    Simulate a two-creature duel with fixed speed order, a minimum-damage floor, and a type-advantage multiplier, then return the winner's name.

    Data Structure Designsimulationdictionariesfloating-pointgame-logic
  • Trees & GraphsMediumAuto-graded
    Merge Accounts Into Groups via Weighted Field Matching

    Group records into clusters where records are linked when their name/email match score reaches a cutoff, using union-find and bucketing on exact field values.

    Trees & Graphsunion-findconnected-componentsgraphhashing
  • System DesignMediumModel answer
    From Class Lifecycles to Hooks: Effects, Stale Closures, Reuse

    Port a class component's fetch-and-timer lifecycle to useEffect, diagnose a stale-closure bug in a counter, and compare HOCs and render props with custom hooks.

    System DesignreacthooksuseEffectclosures
  • Data Structure DesignMediumModel answer
    Snapshot and Restore for an In-Memory String Map

    Build an in-memory string map in C++ that can dump its full state to a byte buffer and rebuild it, handling arbitrary bytes, corrupt input, and failed restores safely.

    Data Structure Designserializationbinary-formathash-mapinput-validation
  • Trees & GraphsMediumAuto-graded
    Anticlockwise Perimeter Walk of an Index-Based Binary Tree

    Compute the anticlockwise perimeter of a binary tree given as child-index arrays, combining root, left edge, leaves and right edge without duplicates.

    Trees & Graphsbinary-treetree-traversaldfsiterative
  • Dynamic ProgrammingHardAuto-graded
    Maximize Priority Sum of Non-Overlapping Tasks

    Find the maximum priority total achievable among non-overlapping interval tasks, prioritizing task count first then total priority.

    Dynamic Programmingdynamic-programminggreedy-intervalsbinary-search
  • Data Structure DesignMediumAuto-graded
    Simulate a Stateful Banking Ledger with Queued Payments

    Simulate an in-memory banking system handling accounts, balances, scheduled payments via a priority queue, and account merges.

    Data Structure Designheaphash-tablesimulationdesign-ds
  • System DesignMediumModel answer
    Architecting a Public and Token-Shared Prompt Library

    Design a scalable prompt-sharing platform supporting public, private, and secret-link access with instant token revocation and high-throughput read caching.

    System Designsystem-designcachingauthorizationdata-modeling
  • Statistics & ExperimentsEasyModel answer
    Diagnosing Product Metric Declines and Testing Growth Interventions

    A structured product analytics framework to investigate feature engagement drops, segment data, frame root-cause hypotheses, and design controlled experiments.

    Statistics & ExperimentsA/B TestingProduct AnalyticsExperiment DesignRoot Cause Analysis
  • BehavioralMediumModel answer
    Building a Reliable Test Suite When Samples Are Scarce

    Describe a repeatable method for writing your own tests on a timed coding assessment: edge-case categories, independent expected outputs, brute-force comparison, and a clear stopping rule.

    Behavioraltestingedge-casesstress-testingonline-assessment
  • Heaps, Sorting & SearchEasyAuto-graded
    Locate Element in Sorted Array

    Perform logarithmic-time binary search on a strictly increasing array of distinct integers to find a target value's index or detect its absence.

    Heaps, Sorting & Searchbinary-searcharrayssearching
  • Arrays & HashingEasyAuto-graded
    Longest Strictly Rising Streak in a Row of Readings

    Scan an integer list once to find the longest block of adjacent, strictly rising values, handling empty input, equal neighbors, and runs that reach the end.

    Arrays & Hashingarrayssliding-windowtwo-pointerslinear-scan
  • SQL & DataEasyAuto-graded
    Content Flagging System Metrics and Abuse Analysis

    Process moderation report logs to calculate unique report ratios and aggregate key reporting metrics per reporter.

    SQL & Dataarraysdictionariesdata-processingmetrics
  • Heaps, Sorting & SearchMediumModel answer
    Rolling Window Medians with Two Heaps and Lazy Removal

    Return the median of every length-k window of an integer array in O(n log k) time, handling duplicates, removals of departing elements, and the even-k convention.

    Heaps, Sorting & Searchsliding-windowheapmedianlazy-deletion
  • StringsMediumAuto-graded
    Spoken Amount Decoder: English Words to Signed Integer

    Parse an English number phrase (up to millions, optional "negative" prefix) into its integer value using a single left-to-right pass with group accumulators.

    Stringsstring-parsingtokenizationhash-mapsimulation
  • Data Structure DesignMediumModel answer
    Thread-Safe Ledger for Courier Payouts and Client Invoices

    Design an in-memory, thread-safe ledger that upserts delivery records and serves instant per-courier earnings and per-client invoice totals in integer cents.

    Data Structure Designconcurrencyhash-mapincremental-aggregationlow-level-design
  • System DesignMediumModel answer
    Design a Desktop OS Notification Framework with AI Collaboration

    Architect a local operating system notification system for desktop apps and use an AI assistant to refine specific low-level logic safely.

    System Designsystem designoperating systemsdesktop appsai workflows
  • Dynamic ProgrammingMediumModel answer
    Prune Minimum Nodes from Tree to Satisfy Height Budget

    Determine the minimal set of non-root node deletions required to trim a multi-child tree's height down to a target limit under node-promotion rules.

    Dynamic Programmingtrees-graphsdynamic-programmingtree-dp
  • Trees & GraphsMediumAuto-graded
    Smallest-ID Study Order for One Goal Course

    Restrict a dependency graph to the ancestors of one goal node, then produce the smallest-ID-first topological order, or an empty list if a cycle blocks it.

    Trees & Graphstopological-sortgraphheapcycle-detection
  • Math & Bit ManipulationMediumAuto-graded
    Whole-Share Rebalancing for a Fractional Stock Ledger

    Simulate customer buy and sell orders against fractional inventory, trading only whole shares with the market, and emit ordered transfer logs and final balances.

    Math & Bit Manipulationsimulationstring-parsinginteger-arithmetichash-map
  • Heaps, Sorting & SearchMediumModel answer
    Three Classics: Spaced Characters, Merged Streams, Cloned Lists

    Solve three linked tasks: rearrange a string so no neighbors match, merge k sorted linked lists, and deep-copy a linked list whose nodes carry an extra arbitrary pointer.

    Heaps, Sorting & Searchheapgreedylinked-liststring
  • Statistics & ExperimentsMediumModel answer
    Three-Ball Draw: Fast Odds for At Least Two Reds

    Find the chance of at least two reds in three draws from a red/blue/green urn, then adapt the result to replacement, a green first draw, and odds form.

    Statistics & Experimentsprobabilitycombinatoricshypergeometricconditional-probability
  • Data Structure DesignMediumModel answer
    Design a Custom CSV Parsing and Filtering Engine

    Implement an in-memory CSV query processor with auto-type inference and polymorphic field filtering.

    Data Structure Designparsingdesign-dsstringsarrays
  • Machine LearningMediumModel answer
    Production Pipeline for Predicting Subscriber Cancellation Within a Week

    Design, evaluate, monitor and roll out a weekly-horizon churn model on a shaky data foundation, covering leakage, time-aware validation, drift detection, retraining rules and fairness.

    Machine Learningml-pipelinechurn-predictiondata-leakagedrift-detection
  • System DesignMediumModel answer
    Build a Multi-Channel Alerting Pipeline for a Social App

    Design a backend that turns events from many product services into push and in-app alerts, with preferences, batching, rate limits, priority lanes, and safe retries.

    System Designsystem-designnotificationsmessage-queuerate-limiting
  • Statistics & ExperimentsHardModel answer
    Picking a Retry Cap for Flaky Audio Streaming

    Use logged interruption events to pick a maximum retry count that balances playback recovery against battery cost, and explain how to correct for bias and validate the choice before launch.

    Statistics & Experimentssurvival-analysisexperimentationcensoringcost-benefit
  • Machine LearningMediumModel answer
    Tenant-Safe Next-File Suggestions with Live Permission Checks

    Design a low-latency recommender that proposes the next file a user will open while keeping each company's data isolated and respecting constantly changing file permissions.

    Machine Learningrecommender-systemsmulti-tenancyaccess-controlcold-start
  • Trees & GraphsEasyModel answer
    Count Activations per Node in a Cascade Graph

    Given a DAG of task dependencies and one start node, compute how many times each node fires when every activation fans out once along every outgoing edge.

    Trees & Graphsdagtopological-sortpath-countinggraph-traversal