KatInterview

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

Interview Practice Problems

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

6107
Problems
2259
Auto-graded
15
Topics
276
Added today

Showing 2371–2400 of 6107 results

  • Machine LearningHardModel answer
    Build a Tiny Backpropagation Engine Over Torch Tensors

    Design a small tensor class that records a computation graph for add, mul, matmul, ReLU and sum, then runs reverse-mode differentiation to give correct gradients for every input.

    Machine Learningautogradbackpropagationreverse-mode-differentiationpytorch
  • BehavioralMediumModel answer
    Executive Behavioral: Elevator Pitch, Company Fit, and Stakeholder Trade-offs

    Craft compelling responses for behavioral questions targeting a Senior Product Manager role, focusing on career story, company alignment, and managing complex stakeholder trade-offs.

    BehavioralBehavioralProduct ManagementStakeholder ManagementTrade-offs
  • Statistics & ExperimentsHardModel answer
    Designing a Geo Experiment for a Seasonal Flu-Shot TV Flight

    Design a six-week local TV flight to lift flu vaccinations: pick and pair markets, define the KPI, choose a causal design, set media weight, run power math, and add guardrails.

    Statistics & Experimentsgeo-experimentcausal-inferencemedia-measurementpower-analysis
  • StringsMediumAuto-graded
    Group Digits of a Signed Integer with a Custom Delimiter

    Build a string from a signed 64-bit integer, placing a delimiter between each group of three digits from the right, with the minus sign kept in front, using manual digit handling.

    Stringsstringsmathformattingdigit-extraction
  • SQL & DataMediumModel answer
    Weekly Revenue Aggregation and Regional Drop Attribution

    Aggregate weekly revenue in SQL using ISO weeks, calculate period-over-period performance, and attribute regional drop drivers with guardrails against incomplete weeks.

    SQL & Datasqltime-seriesaggregationwindow-functions
  • Trees & GraphsMediumAuto-graded
    Alphabetical Job Scheduler with Prerequisite Rules

    Produce a full run order for jobs under prerequisite constraints, always picking the alphabetically smallest available job, or return an empty list if a cycle exists.

    Trees & Graphstopological-sortheapgraphkahn-algorithm
  • Heaps, Sorting & SearchMediumAuto-graded
    Locate K Nearest Values in a Sorted Sequence

    Binary search for the starting boundary of a contiguous k-element slice minimizing distance to a given target in a sorted list.

    Heaps, Sorting & Searchbinary-searchtwo-pointersarrays
  • Trees & GraphsMediumAuto-graded
    Vertical Column Grouping of Array-Represented Binary Trees

    Organize the elements of a binary tree into vertical columns using level-order traversal rules on a level-order array input.

    Trees & Graphstrees-graphsbreadth-first-searcharraysqueues
  • System DesignMediumModel answer
    Design a Resilient Order Refund Workflow Engine

    Design an idempotent, durable DAG workflow execution system for processing order refunds, handling step dependencies, crash recovery, manual reviews, and financial consistency.

    System Designsystem-designdistributed-systemsidempotencystate-machines
  • BehavioralMediumModel answer
    Walk Through a Past Project and What You'd Change

    Describe a substantial technical project from the last two years, covering the problem, design trade-offs, delivery obstacles, measured results, and an honest look at what you would redo.

    Behavioralbehavioralproject-deep-diveretrospectivetechnical-leadership
  • Data Structure DesignMediumModel answer
    Transit Fleet Simulator: Sampling, Seating Limits, and Fast-Lane Riders

    Build a bus network simulator: downsample riders by origin-destination pair, board and drop under a capacity cap, validate event logs, and give priority-pass riders precedence.

    Data Structure Designsimulationheapstratified-samplingevent-ordering
  • Data Structure DesignMediumAuto-graded
    Simulate a Tiny Hierarchical File Store from a Command Log

    Replay a command log against an in-memory directory tree, with auto-created parent folders, file appends, reads and sorted listings.

    Data Structure Designdesigntrietreehash-map
  • Arrays & HashingMediumAuto-graded
    Most Popular Three-Page Browsing Path Across Users

    Group visit logs by user, order them by time, and find the three-page ordered path shared by the most distinct users, with a lexicographic tie-break.

    Arrays & Hashinghashingsortingcombinationscounting
  • Trees & GraphsMediumAuto-graded
    Find k-th Subordinate in Cascade Traversal

    Find the k-th node reached during a preorder depth-first traversal of a specific node's subtree when children are visited in ascending numerical order.

    Trees & Graphstrees-graphsdfstree-traversal
  • Data Structure DesignMediumAuto-graded
    Hierarchical Storage Simulator with Auto-Renamed Duplicates

    Simulate an in-memory directory tree with auto-created folders, numbered duplicate file names that respect extensions, content lookup, and sorted listings.

    Data Structure Designdesignhash-mapstring-parsingsimulation
  • Trees & GraphsMediumModel answer
    Shared Ancestors: Binary Tree to Multi-Parent Graph

    Find the lowest common ancestor of two nodes in a binary tree, then generalize to a directed acyclic graph where several incomparable lowest common ancestors can exist.

    Trees & Graphslowest-common-ancestorbinary-treedagbfs
  • Trees & GraphsEasyAuto-graded
    Trace Path to Terminal Node or Cycle Entry

    Determine the final visited node when following single-successor directed edges until reaching a dead end or a previously visited node.

    Trees & Graphstrees-graphsarrayshash-table
  • System DesignHardModel answer
    Building a Pipeline for Fleet-Captured Panoramic Imagery

    Design a system that receives huge volumes of geotagged panoramic photos from a vehicle fleet, stores raw and processed versions durably, and serves location-based tiles quickly.

    System Designsystem-designobject-storagegeospatial-indexingresumable-uploads
  • Statistics & ExperimentsMediumModel answer
    Is This Coin Biased? Testing 560 Tails in 1,000 Tosses

    Run a two-sided one-sample proportion test on 560 tails out of 1,000 tosses at the 5% level, covering hypotheses, test statistic, p-value, and interpretation.

    Statistics & Experimentshypothesis-testingproportion-testnormal-approximationp-value
  • Trees & GraphsMediumAuto-graded
    Can Every Task Be Scheduled Given Dependency Pairs?

    Tests modeling dependencies as a directed graph and detecting whether a cycle prevents a complete valid ordering, e.g. via indegree-based topological sorting.

    Trees & Graphsgraphtopological-sortcycle-detectionbfs
  • BehavioralEasyModel answer
    Walk Through a Production Defect You Contained and Prevented

    Describe a real production defect you found: how you limited the damage, found the root cause, verified the fix, and added a lasting control so it could not happen again.

    Behavioralbehavioralincident-responsestar-methodroot-cause-analysis
  • Greedy & IntervalsMediumAuto-graded
    Weekly Deploy Windows with Time Zones and Blackouts

    Convert weekly recurring allow and freeze windows from local time zones to UTC, subtract the freezes, and list the first usable slots after a notice period.

    Greedy & Intervalsintervalssweep-linetime-zonesmodular-arithmetic
  • Machine LearningMediumModel answer
    End-to-End E-Commerce Purchase Intent Prediction Pipeline

    Design a robust data cleaning, pipeline, validation, and threshold-tuning strategy to predict session conversions evaluated on weighted F1 score.

    Machine Learningdata-preprocessingfeature-engineeringcross-validationclassification
  • Data Structure DesignHardAuto-graded
    Cache, Quota Gate and Burst Counter: Batch Operation Runner

    Simulate a batch of operations on an O(1) LFU cache, a fixed-window per-user quota check, and a two-pointer peak request counter.

    Data Structure Designlfu-cacheordered-dictrate-limitingtwo-pointers
  • Heaps, Sorting & SearchMediumAuto-graded
    Maximize Resource Harvest with Linear Depletion

    Find the maximum yield from extracting resources over K time steps when each extraction reduces a site's yield by 1 using binary search on the minimum threshold.

    Heaps, Sorting & Searcharraysheaps-sortinggreedy-intervalsmath-bits
  • System DesignMediumModel answer
    Git Branching, Large-Asset Management, and CI Pipeline Architecture

    Architect a robust Git branching model, asset versioning strategy, and CI integration for software repos dealing with large binary artifacts and automated testing.

    System Designgitci-cddevopstesting
  • System DesignMediumModel answer
    Build a Crash-Resilient Delayed and Recurring Task Runner

    Design a distributed service that runs one-off and cron-style tasks at scale with no lost work, safe retries, duplicate-submission protection, and cancellation.

    System Designsystem-designdistributed-systemsschedulingfault-tolerance
  • BehavioralHardModel answer
    Motivation and Engineering Mindset for an AI Safety Role

    Answer a three-part screening question on why you want to work on AI safety, a safeguards project you built, and how you balance shipping speed with verification.

    Behavioralbehavioralai-safetymotivationsafeguards
  • Statistics & ExperimentsMediumModel answer
    Separating Automated Traffic from a Sudden Active-User Surge

    Estimate how much of a short-term rise in daily active users comes from scripts rather than people, model overdispersed login counts, quantify uncertainty, and handle heavy-tailed comparisons.

    Statistics & Experimentsnegative-binomialmixture-modelsbootstrapheavy-tails
  • Greedy & IntervalsMediumAuto-graded
    Metered Usage Bill with Special Rate Windows

    Compute a total bill over a half-open time window where disjoint special-rate windows replace the default hourly rate, testing interval clipping and boundary handling.

    Greedy & Intervalsintervalssweepmatharrays