KatInterview

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

Interview Practice Problems

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

6025
Problems
2231
Auto-graded
15
Topics
273
Added today

Showing 4981–5010 of 6025 results

  • Machine LearningHardModel answer
    ML-Driven Budget Pacing System for Programmatic Advertising

    Design an end-to-end system that forecasts ad inventory and prices, dynamically paces campaign spend, and enforces hard budget caps across hundreds of thousands of concurrent campaigns.

    Machine Learningml-system-designadsforecastingpacing
  • Dynamic ProgrammingMediumAuto-graded
    Split-or-Enumerate Symbol Sequence Decoder

    Tests string parsing, memoized backtracking, and combinatorial enumeration by decoding a symbol-encoded message with either explicit or missing letter boundaries.

    Dynamic Programmingstringsdynamic-programmingbacktracking
  • Arrays & HashingMediumAuto-graded
    Repair a Looping Script by Swapping One Instruction

    Tests simulation, cycle detection, and brute-force search by finding the single jmp/nop swap that lets a small virtual machine terminate cleanly.

    Arrays & Hashingsimulationcycle-detectionbrute-force
  • Data Structure DesignHardAuto-graded
    Multi-Consumer Iterator with Shared Buffering

    Tests iterator protocols, lazy evaluation, and memory-efficient buffering for multiple independent consumers reading from a single source stream.

    Data Structure Designiteratorsgeneratorsmemory-management
  • Trees & GraphsMediumModel answer
    Employee Hierarchy: Counting Trees, Level Traversal, and Ancestor Search

    Build a management structure from employee records, then count independent hierarchies, display staff by organizational depth, and locate shared supervisors.

    Trees & Graphstree-constructionlevel-order-traversallowest-common-ancestorgraph-fundamentals
  • BehavioralMediumModel answer
    Behavioral Round: Collaboration, Disagreement, and a Setback

    Prepare and deliver one STAR-structured story each on working with a team, navigating a disagreement, and owning a failure.

    BehavioralSTARteamworkconflict resolutionfailure and growth
  • Data Structure DesignMediumAuto-graded
    Batch Counter Updates with Global Shift and Min Extraction

    Tests lazy global offset propagation and min-heap with lazy deletion to efficiently manage counters under bulk increments and minimum extraction.

    Data Structure Designheaplazy-propagationdesign
  • System DesignHardModel answer
    Virtual Currency Ledger with Real-Time Aggregation

    Build a transactional ledger supporting currency transfers, 24-hour flow queries, and 30-day hourly balance history at scale.

    System Designledgertransactionsaggregationdistributed-systems
  • Arrays & HashingEasyAuto-graded
    Classify Temperatures into Three Weather Bands

    Tests careful boundary handling by bucketing integer temperatures into cold, mild, and hot ranges and returning the three counts in order.

    Arrays & Hashingarrayscountingboundary conditions
  • SQL & DataMediumAuto-graded
    Rolling-Window Post Engagement: Reach, Length Percentiles, Self-Replies

    Tests SQL/Python analytics skills: filtering soft-deleted records, distinct-count aggregation, linear-interpolation percentiles, time-windowed grouping, and tie-breaking sort logic.

    SQL & Datasqlaggregationpercentiles
  • Arrays & HashingMediumAuto-graded
    Rectangular Stamp Overlap Counter

    Tests whether a candidate can use a 2D difference array to efficiently count how many rectangular regions overlap each cell of a grid.

    Arrays & Hashing2d-arrayprefix-sumdifference-array
  • Math & Bit ManipulationMediumAuto-graded
    Calculate Day Count Between Two Dates

    Tests understanding of calendar arithmetic including leap year logic, month lengths, and converting dates to a numeric representation.

    Math & Bit Manipulationmathimplementationdate-arithmetic
  • Arrays & HashingEasyAuto-graded
    Find Days Available to All Participants

    Tests set intersection logic and handling of multiple collections to find common elements across all inputs.

    Arrays & Hashingsetsintersectionarrays
  • Data Structure DesignMediumAuto-graded
    Running Median Tracker with Dual-Heap Design

    Tests the ability to maintain an efficient two-heap structure that yields the current median of a growing integer stream in O(log n) per insertion and O(1) per query.

    Data Structure Designheaptwo-heapsdata-streammedian
  • System DesignHardModel answer
    Debug Three Injected Defects in an Open-Source Template Engine

    Track down and fix three bugs in a Python template library: a silent AST visitor gap, a directory/file confusion in template lookup, and comment-only blocks that generate invalid Python.

    System Designdebuggingastpythontemplate-engine
  • BehavioralMediumModel answer
    Navigating a Hard Call with Your Product Partner

    Walk through a real example where you and a product manager jointly owned a tough decision involving scope, timing, quality, or measurement.

    Behavioralcollaborationproduct-engineering alignmentambiguitytrade-offs
  • Statistics & ExperimentsMediumModel answer
    Design and Evaluate a Premium Delivery Tier for a Food Platform

    Design a metric framework, experiment, and incremental margin model for a paid fast-delivery subscription in a two-sided food delivery marketplace.

    Statistics & Experimentsexperimentationmarketplacemetricscausal-inference
  • BehavioralMediumModel answer
    Testing a Leaf-Counting System

    Design a comprehensive test strategy for a system that counts leaves on a large tree, addressing ambiguity, test oracles, functional coverage, and scale.

    Behavioraltestingqatest-strategyambiguity-resolution
  • Trees & GraphsHardAuto-graded
    Detect File Changes Using Content-Based Tree Hashing

    Tests hierarchical hashing, tree traversal, and efficient change detection across nested directory structures

    Trees & Graphshashingtree-traversaldiff-algorithms
  • Data Structure DesignMediumAuto-graded
    Simulate Least-Recently-Used Cache Operations

    Tests your ability to implement a data structure that maintains access order and performs lookups, updates, and evictions efficiently.

    Data Structure Designhash-maplinked-listcacheordered-dict
  • BehavioralMediumModel answer
    Show Me You're Still Learning: Recent Skill or Concept Applied

    Describe something specific you learned recently, explain it clearly enough to teach it, and show how you put it to use at work.

    Behaviorallearning agilitycommunicationsenior engineergrowth mindset
  • Trees & GraphsMediumAuto-graded
    Largest Land Mass After One Water-to-Land Conversion

    Tests grid connected-component labeling and the ability to optimally merge adjacent island regions by flipping a single water cell to land.

    Trees & Graphsgraphbfs-dfsconnected-componentsgrid
  • Trees & GraphsMediumAuto-graded
    Smallest Valid Sequence with Dependencies

    Tests topological sorting with lexicographic tie-breaking and cycle detection in a directed graph.

    Trees & Graphstopological-sortgraphheapcycle-detection
  • System DesignMediumModel answer
    Design a Live Multiplayer Typing Race with Spectator Support

    Design a real-time platform where players matched by language race to type the same passage, see live progress and errors, serve error-freeze penalties, and can be watched by spectators.

    System Designreal-timewebsocketsmatchmakingfan-out
  • Trees & GraphsMediumModel answer
    Resolve Variable Assignments with Dependencies

    Parse assignment statements and compute a variable's value by recursively resolving dependencies, detecting cycles and undefined references.

    Trees & Graphsrecursiongraphsparsingdfs
  • Arrays & HashingMediumAuto-graded
    Puddles in a Valley: Water Volume Between Terrain Columns

    Tests whether a candidate can compute trapped water volume across a height profile using the two-pointer O(1)-space technique.

    Arrays & Hashingtwo-pointersprefix-maxarrays
  • BehavioralMediumModel answer
    Demonstrating Leadership Through Six Rapid Scenarios

    Respond to six leadership scenarios covering privacy judgment, risk negotiation, partner collaboration, incident triage, mentorship, and accountability with concrete examples.

    Behavioralleadershipincident-responsementorshipprivacy
  • Arrays & HashingHardAuto-graded
    Distinct Value Sum Across Peak-Score Square Ring Windows

    Tests 2D prefix sums, border enumeration, multi-way tie tracking, and cross-frame value deduplication on square ring-shaped windows of a matrix.

    Arrays & Hashing2d-prefix-summatrixsliding-window
  • BehavioralMediumModel answer
    Articulate Your Motivation for a Specific Engineering Role

    Explain why you want to join a particular engineering team by connecting specific reasons to your own project experience and a concrete contribution you could make.

    Behavioralmotivationfitself-awareness
  • Data Structure DesignMediumAuto-graded
    Contiguous Block Allocator with Tag-Based Memory Management

    Tests segment tree design for efficiently finding and tracking contiguous free blocks in a memory-like array with logarithmic-time allocation and release operations.

    Data Structure Designsegment-treeinterval-managementdata-structure-design