KatInterview

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

Interview Practice Problems

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

5965
Problems
2208
Auto-graded
15
Topics
271
Added today

Showing 31–60 of 5965 results

  • Data Structure DesignMediumAuto-graded
    Room Assignment and Leaderboard for Streaming Sessions

    Simulate a stream of operations that assigns sessions to the lowest-numbered free room and reports the top-k streams by total duration, tested with heaps and lazy deletion.

    Data Structure Designheapdesignsimulationlazy-deletion
  • System DesignMediumModel answer
    Designing Reusable Agent Skills with Staged Context Loading

    Describe what a reusable skill package is in an agent system, how it differs from a plain prompt, and how loading its content in stages keeps context small while limiting risk.

    System Designagentsllm-systemscontext-managementprogressive-disclosure
  • Dynamic ProgrammingMediumAuto-graded
    Process Morse Signals and Provider Coverage

    Evaluate string encoding, ambiguous Morse code decoding via dynamic programming, and spatial coverage checking for network members.

    Dynamic Programmingdynamic-programmingstringsarraysgeometry
  • Trees & GraphsHardModel answer
    Grid Partitioning and Navigating Safe Subregions

    Construct a valid contiguous layout for multiple crop zones on a grid and find the shortest path avoiding edge-touching zones.

    Trees & Graphstrees-graphsgridbfsconstructive-algorithms
  • Statistics & ExperimentsMediumModel answer
    Testing a Global-Ranking Change in a Location-Based Social App

    Design metrics, a randomization scheme that handles interference, and a novelty-versus-durable-effect plan for a ranking change that favors globally active users over nearby ones.

    Statistics & Experimentsab-testingmarketplacenetwork-effectsinterference
  • Data Structure DesignMediumModel answer
    Design a Blackjack Game Engine

    Architect an object-oriented Blackjack engine handling multi-deck shoes, split hands, and soft/hard total calculations.

    Data Structure DesignData Structure DesignObject-Oriented DesignState Machine
  • Trees & GraphsHardAuto-graded
    Dictionary Words Hidden in a Letter Grid

    Find every dictionary word that can be traced through adjacent, non-repeating cells of a letter grid, which rewards sharing prefixes across words instead of searching per word.

    Trees & Graphstriebacktrackingdfsgrid
  • System DesignMediumModel answer
    Design an Automated Health and Recovery Platform for a GPU Fleet

    Design a platform that ingests high-rate telemetry from 100,000 GPU servers, detects hardware faults, runs safe repair workflows, and limits how many machines are taken offline at once.

    System Designsystem-designtelemetrykafkaworkflow-engine
  • Trees & GraphsMediumModel answer
    Graph Toolkit for Scene and Dependency Graphs: Sort, Traverse, Route

    Implement topological sort, BFS, DFS and Dijkstra on a dependency graph, then discuss CSR versus adjacency lists, CPU/GPU parallel traversal, and deterministic testing.

    Trees & Graphstopological-sortbfs-dfsdijkstracsr
  • System DesignMediumModel answer
    Camera Lens Health Monitor and Intermittent Fault Triage for a Driver-Assist Vehicle

    Design a sensor layout, lens-obstruction detector and fallback logic for a driver-assist vehicle, then plan how to track down a camera fault that fires about once an hour in clear weather.

    System Designembeddedautomotivesensor-fusionfault-diagnosis
  • System DesignMediumModel answer
    Designing a Modular and Fault-Tolerant Retry Library

    Design a pluggable retry library that supports configurable backoff, jitter strategies, stopping criteria, cancellation timeouts, and dynamic retry headers.

    System DesignAPI DesignFault ToleranceConcurrencyDesign Patterns
  • Statistics & ExperimentsHardModel answer
    Three-Variable Correlation Limits and Omitted Regressor Bias

    Show why three correlations must satisfy a determinant constraint, find the valid equicorrelation range, and derive the probability limit of a slope when a relevant regressor is left out.

    Statistics & Experimentscorrelation-matrixpositive-semidefiniteomitted-variable-biaslinear-regression
  • BehavioralEasyModel answer
    Navigating a Technical Disagreement With a Colleague

    Describe a real technical disagreement with a teammate or stakeholder, how you used evidence and respectful dialogue to reach a decision, and what you learned about working in a team.

    Behavioralbehavioralconflict-resolutioncollaborationdecision-making
  • Statistics & ExperimentsMediumModel answer
    Comparing Bayesian and Frequentist Decision Rules in A/B Testing

    Analyze an A/B experiment using Bayesian posteriors, expected loss decision rules, sequential peeking effects, and prior calibration techniques.

    Statistics & Experimentsstatisticsab-testingbayesian-inferencehypothesis-testing
  • Data Structure DesignEasyAuto-graded
    Sliding Five-Minute Hit Tally for Each Caller

    Process a batch of hit and query operations, returning each caller's number of hits within an inclusive 300-second window, using per-caller queues with lazy expiry.

    Data Structure Designhash-mapqueuesliding-windowsimulation
  • SQL & DataMediumModel answer
    Calculate Current Item Inventory from Movements and Baselines

    Compute up-to-date item stock by merging starting snapshot balances with subsequent movement logs using SQL aggregations and joins.

    SQL & Datasqlaggregationjoins
  • StringsMediumAuto-graded
    Alphabetically Greatest Tail of a String

    Find the lexicographically greatest suffix of a long lowercase string in linear time by comparing candidate start positions without copying and skipping eliminated blocks.

    Stringsstringstwo-pointersgreedysuffix
  • BehavioralMediumModel answer
    Telling the Story of Your Best Open-Source Pull Request

    Describe a real open-source contribution end to end: the project, your role, design choices, review collaboration, measurable results, and what you did after the merge.

    Behavioralbehavioralopen-sourceownershipstar-method
  • BehavioralMediumModel answer
    Demonstrating Informal Leadership, Technical Pivot, and Project Ownership

    Learn how to structure a behavioral interview answer showing cross-functional leadership without explicit authority, handling pivots with data, and delivering measurable impact.

    Behavioralleadershipownershipinfluence-without-authoritybehavioral-interview
  • Data Structure DesignHardAuto-graded
    Best-Fit Block Manager with Splitting and Merging

    Simulate a best-fit memory manager on a fixed address range, handling splits, exact-start frees, invalid frees, and merging of neighboring free blocks using plain lists.

    Data Structure Designsimulationbinary-searchmemory-allocatorbest-fit
  • BehavioralMediumModel answer
    Two Project Deep Dives and Three Leadership Scenarios

    Present two contrasting projects with your role, decisions, results and lessons, then explain how you handle vague requirements, slipping deadlines and decisions made without full data.

    Behavioralbehavioralleadershipstakeholder-managementdecision-making
  • System DesignMediumModel answer
    Design a Clickstream Analytics Pipeline for a Mobile App

    Design a pipeline that ingests client events such as installs and clicks, powers near-real-time dashboards, and keeps raw data for batch analysis, with explicit correctness trade-offs.

    System Designsystem-designstreamingkafkaanalytics
  • SQL & DataMediumModel answer
    Set Operations, Top-N Windows and SCD2 for Sensor Data

    Compare UNION and UNION ALL, write a NULL-safe anti-join and a top-3-per-group query, then explain star-schema roles and Type 2 history tracking for a sensor dimension.

    SQL & Datasqlwindow-functionsdata-warehousescd-type-2
  • Math & Bit ManipulationMediumAuto-graded
    Implement Binary Exponentiation

    Evaluate floating-point powers with integer exponents using logarithmic time binary exponentiation without standard library power methods.

    Math & Bit Manipulationmathbinary-exponentiationbit-manipulation
  • Data Structure DesignMediumModel answer
    Build a Batch Grayscale Thumbnailer with Worker Pools

    Design and code a Pillow-based batch tool that grayscales and shrinks images, then scale it to many large files with multiprocessing, robust error handling, bounded memory and benchmarks.

    Data Structure Designpythonpillowmultiprocessingconcurrency
  • Greedy & IntervalsMediumAuto-graded
    Pair Lab Visits with Follow-Up Consultations from 10-Minute Slots

    Validate and merge 10-minute availability slots, expand them into 30-minute visits, and list every lab-then-consultation pairing with a wait of 0 to 60 minutes.

    Greedy & Intervalsintervalsmergingbinary-searchsorting
  • BehavioralMediumModel answer
    Four Behavioral Stories for a Data Scientist Screen

    Prepare four distinct stories showing initiative, technical project depth, rigorous problem-solving, and deliberate relationship-building, each with a clear action and measurable result.

    BehavioralbehavioralSTARdata-scienceleadership
  • Math & Bit ManipulationMediumAuto-graded
    Maximize Expected Return in Two Opaque Containers Game

    Find the optimal sequence of deposit and collection moves to maximize expected value in an unobserved two-container game.

    Math & Bit Manipulationprobabilityexpected-valuegreedymath
  • Arrays & HashingEasyAuto-graded
    Maximum Gain from Single Asset Trade

    Determine the maximum possible gain achieved by completing at most one purchase and sale transaction over a sequence of prices.

    Arrays & Hashingarraysgreedyprefix-minimum
  • Statistics & ExperimentsHardModel answer
    Power, Guardrails and Ramp Plan for a New Feed Ranker Test

    Plan an A/B test for a new feed ranking model: size it for a small CTR lift, add guardrails and sequential stopping, use CUPED, control interference, and define the ramp decision.

    Statistics & Experimentsab-testingpower-analysiscupedsequential-testing