KatInterview

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

Interview Practice Problems

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

6003
Problems
2223
Auto-graded
15
Topics
273
Added today

Showing 5341–5370 of 6003 results

  • StringsMediumAuto-graded
    Maximum Distinct Character Window

    Tests sliding window technique with hash maps to find the longest contiguous span of non-repeating characters in a string.

    Stringssliding-windowhash-maptwo-pointers
  • Heaps, Sorting & SearchMediumAuto-graded
    Sort a Large Sequence Using Memory-Bounded Runs and a Heap

    Tests knowledge of two-phase external sorting: chunking a sequence into fixed-size sorted runs, then merging them efficiently with a min-heap.

    Heaps, Sorting & Searchheapsortingmergesimulation
  • Arrays & HashingMediumAuto-graded
    Detect Tic-Tac-Toe Termination on an n×n Grid

    Tests scanning all rows, columns, and diagonals for a complete line of matching non-zero marks, and detecting a full board with no remaining moves.

    Arrays & Hashingarraysmatrixgame-simulation
  • Statistics & ExperimentsMediumModel answer
    Validating Experiment Results and Measuring Review Impact

    Check whether a button color A/B test's retention drop is real or caused by test quality issues, then design a method to estimate how negative reviews affect repurchase.

    Statistics & Experimentsexperimentationcausal-inferencebias-detection
  • StringsEasyAuto-graded
    First Longest Word with Even Character Count

    Tests string parsing, filtering by character parity, tracking maxima with tie-breaking, and handling whitespace edge cases.

    Stringsstring-manipulationlinear-scanedge-cases
  • BehavioralMediumModel answer
    Demonstrating Responsible AI Tool Usage in Engineering

    Describe a real scenario where you incorporated AI assistance into technical work, covering verification steps, boundary decisions, and outcome quality.

    Behavioralai-toolsengineering-judgmentcode-qualityprofessional-development
  • BehavioralHardModel answer
    Database Concurrency and Code Verification Strategy

    Design a safe approach to fixing timestamp overwrites in a high-concurrency system while explaining how to validate code suggestions from automated tools.

    Behavioraldatabasesconcurrencydebuggingcode-review
  • BehavioralMediumModel answer
    Demonstrating Impact and Cross-Functional Leadership

    Articulate concrete examples of ownership, metric-driven decision-making, prioritization under ambiguity, and stakeholder alignment for a technical role.

    Behavioralleadershipcommunicationmetricsprioritization
  • Greedy & IntervalsMediumAuto-graded
    Minimum Conference Rooms for Scheduled Meetings

    Tests greedy interval scheduling with heap-based resource allocation to find the smallest number of rooms needed for overlapping meetings.

    Greedy & Intervalsintervalsheapgreedyscheduling
  • Greedy & IntervalsEasyAuto-graded
    Count Rooms In Use at Peak Time

    Tests the sweep-line technique by finding the maximum number of meeting rooms simultaneously occupied across a set of half-open booking intervals.

    Greedy & Intervalsgreedysweep lineintervals
  • Data Structure DesignMediumModel answer
    Build a Tic-Tac-Toe Game Engine with Move Validation

    Design and implement a class that tracks board state, validates moves, detects winners, and enforces turn-based gameplay for a 3×3 grid game.

    Data Structure Designstate-machinegame-logicobject-oriented-design
  • System DesignHardModel answer
    Build a real-time bidding platform with proxy bids and soft close

    Design a scalable auction system handling 500k live auctions, 5M watchers, proxy bidding, reserve prices, buy-it-now, soft close, and sub-200ms bid latency.

    System Designauctionsreal-timeconsistencysharding
  • Arrays & HashingHardModel answer
    Rearrange Grid Cells into Alternating-Row Order via Adjacent Swaps

    Output a sequence of orthogonal-neighbor swaps that transforms a permuted square grid into alternating-row sorted form.

    Arrays & Hashingmatrixgreedysimulationsorting
  • System DesignMediumModel answer
    Diagnosing Latency Spikes in a Thread-Pool Server

    Investigate why a network server's P99 latency jumps from 10ms to 2s under load despite low CPU usage, and propose a plan to identify the bottleneck.

    System Designperformanceconcurrencyprofiling
  • Trees & GraphsMediumAuto-graded
    Compute Subtree Sums from Parent Array

    Tests bottom-up aggregation in trees represented as parent arrays, requiring iterative traversal to avoid recursion limits on deep trees.

    Trees & Graphstreespost-orderaggregationiterative
  • Data Structure DesignEasyAuto-graded
    Gem Purchase Simulator with Color-Based Discounts

    Tests stateful simulation with resource tracking, discount accumulation, and transactional updates.

    Data Structure Designsimulationstate-managementhash-map
  • Stacks & QueuesHardAuto-graded
    Final Sale Prices with Discount Tracking

    Tests monotonic stack usage to efficiently find next smaller-or-equal elements and aggregate results with index tracking.

    Stacks & Queuesmonotonic-stackarraysaggregation
  • Math & Bit ManipulationMediumAuto-graded
    Anti-Diagonal Cell in Outward Spiral Matrix

    Finding a specific value in a spiral-filled matrix using mathematical properties of concentric rings rather than simulation.

    Math & Bit Manipulationmatrixspiralmathclosed-form
  • Statistics & ExperimentsHardModel answer
    Expected Value and Pricing Strategy for a Coin-Flip Doubling Game

    Analyze a game where a fair coin doubles your stake on heads and ends on tails; compute expected value, determine rational pricing, and explore repeated-play strategies.

    Statistics & Experimentsprobabilityexpected-valueutility-theorykelly-criterion
  • Statistics & ExperimentsHardModel answer
    Understanding Standardized Effect Sizes in Statistical Testing

    Explain the purpose and interpretation of standardized test statistics in hypothesis testing, their relationship to uncertainty quantification, and when they can mislead.

    Statistics & Experimentshypothesis-testingstatistical-inferencea-b-testingconfidence-intervals
  • Trees & GraphsMediumModel answer
    Recursive Disk Transfer Between Three Pegs

    Move n disks from one peg to another using a spare peg, one at a time, never placing a larger disk on a smaller one.

    Trees & Graphsrecursionalgorithm-designcomplexity-analysis
  • SQL & DataMediumAuto-graded
    Aggregating Safety and Activity Metrics Across Multiple Entities

    Tests proficiency in multi-table aggregation, ratio computation, windowed moving averages, and handling edge cases with missing data.

    SQL & Dataaggregationjoinswindow-functionsdata-analysis
  • Data Structure DesignMediumModel answer
    Scored Catalog Rotator: Ordered Traversal with Live Updates

    Design an in-memory playlist that always serves the highest-scored unseen item per round, supports live score changes, and is safe for concurrent callers.

    Data Structure Designheaptreemapconcurrencydata-structure-design
  • Greedy & IntervalsMediumAuto-graded
    Minimum Paint Strokes to Cover a Board

    Tests the ability to merge overlapping intervals greedily to find the fewest horizontal paint strokes needed to fully cover a set of colored segments on a 1-D board.

    Greedy & Intervalsgreedyintervalssorting
  • Statistics & ExperimentsHardModel answer
    Diagnose a disease with a rare-subtype twist using Bayes

    Apply Bayes' theorem across two sequential test stages to find the true probability a patient has a rare disease subtype given a positive confirmatory test.

    Statistics & Experimentsconditional probabilityBayes' theoremstatisticsfalse positives
  • Math & Bit ManipulationMediumAuto-graded
    Desert Transport: Maximum Cargo Delivery with Consumption Cost

    Tests piecewise optimization and depot strategy when a vehicle with limited capacity must transport goods while consuming resources proportional to distance traveled.

    Math & Bit Manipulationoptimizationmathgreedysimulation
  • StringsMediumAuto-graded
    Maximum Substring Length with Character Limit

    Tests sliding window technique to find the longest contiguous sequence where the number of unique characters does not exceed a threshold.

    Stringssliding-windowhash-maptwo-pointers
  • Greedy & IntervalsMediumAuto-graded
    Schedule Maximum Jobs Before Their Deadlines

    Tests greedy scheduling with deadlines: select the maximum number of unit-length jobs, each with a profit and deadline, maximizing total profit within deadline slots.

    Greedy & Intervalsgreedyschedulingintervalssorting
  • System DesignMediumModel answer
    Build a Link Compression Service

    Design a scalable service that converts long URLs into compact aliases and redirects users back to the original destinations.

    System Designdistributed-systemsscalabilitycachingdatabases
  • BehavioralMediumModel answer
    Behavioral Interview: Background, Ownership, and Safety Engineering

    Demonstrate judgment, ownership, and practical safety thinking through your background, impactful work, and approach to risk mitigation in AI systems.

    Behavioralbehavioralleadershipai-safety