KatInterview

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

Interview Practice Problems

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

6079
Problems
2254
Auto-graded
15
Topics
270
Added today

Showing 4081–4110 of 6079 results

  • Arrays & HashingMediumAuto-graded
    K-th Missing Positive and Sliding-Window Duplicate Events

    Tests order-statistics reasoning for k-th missing positive integers and time-window frequency tracking to detect repeated log events.

    Arrays & Hashingarrayssortingsliding-window
  • Arrays & HashingEasyAuto-graded
    Repeated Values and Longest Two-Distinct Subarray

    Tests hash-based duplicate detection alongside a sliding window that finds the longest subarray containing exactly two distinct integer values.

    Arrays & Hashingsliding-windowhashingtwo-pointers
  • Statistics & ExperimentsHardModel answer
    Diagnose a Usage Drop and Design a Subscription Trial

    Decompose a 10% monthly decline in ride activity, identify root causes, and design and evaluate a free-trial subscription experiment end to end.

    Statistics & Experimentsproduct analyticsexperimentationfunnel analysiscohort retention
  • Data Structure DesignMediumAuto-graded
    Variable Registry With Deep Reference Expansion and Cycle Detection

    Tests recursive variable substitution with memoization, cycle detection across direct and indirect references, and clean handling of undefined variable references.

    Data Structure Designstringsrecursionhash-mapcycle-detection
  • Data Structure DesignMediumAuto-graded
    Running Median via Dual-Heap Simulation

    Tests whether a candidate can maintain a live median over an integer stream in O(log n) per insert using two heaps balanced around the midpoint.

    Data Structure Designheapsdata-structure-designonline-algorithms
  • System DesignHardModel answer
    Build a Game-Agnostic Two-Player Match Runner

    Design a modular Python framework that can run any two-player turn-based game by swapping rule and agent implementations without touching the core loop.

    System Designobject-oriented designstrategy patternextensibilitypython
  • Math & Bit ManipulationEasyAuto-graded
    Four Colleagues in a Row: Recover the Exact Standing Order

    Tests constraint satisfaction and logical deduction by finding the unique left-to-right arrangement of four people from four positional clues.

    Math & Bit Manipulationlogicconstraint-satisfactionbrute-forcepermutations
  • System DesignHardModel answer
    Build a Multi-GPU Test Harness in Python

    Design and implement a pytest-style test harness that runs graphics validation tests in parallel across multiple GPUs, handling fixtures, retries, and process isolation.

    System Designpythontestingconcurrencyasyncio
  • System DesignMediumModel answer
    Chatbot ROI Case: Value for the Bank vs. Value for Customers

    Make the case for (and against) a customer-facing bank chatbot, tying each benefit to a mechanism and metric and each risk to a mitigation.

    System Designproduct-designcase-studychatbotfintech
  • Statistics & ExperimentsHardModel answer
    Measuring Impact of a Spam Filter on Friend Request Acceptance

    Design an A/B test to measure how a tighter spam filter affects 24-hour friend-request acceptance, including randomization, metrics, power, and missing labels.

    Statistics & Experimentsexperimentationcausal-inferencea-b-testingmetrics
  • Arrays & HashingMediumAuto-graded
    Leftmost Busiest Slot After Range Increments

    Apply many inclusive range additions over a possibly huge array and return the index holding the largest total, breaking ties toward the smallest index.

    Arrays & Hashingdifference-arrayprefix-suminterval-updatestie-break
  • BehavioralMediumModel answer
    Build a Coherent PM Career Narrative for a Consumer Tech Role

    Structure a compelling self-introduction, ownership walkthrough, and motivation story that connects your background to a consumer content or platform PM role.

    Behavioralcareer-storyself-introductionproduct-sensemotivation
  • Data Structure DesignMediumModel answer
    Library Loan Alert Engine: Holds, Checkouts, and Due Reminders

    Design a notification manager for a book lending system that handles hold queues, checkout allocation, and idempotent due-date alerts.

    Data Structure Designheapsimulationidempotencyqueue
  • Trees & GraphsMediumModel answer
    Closest Shared Ancestor for a Group of Org-Chart Nodes

    Build a validated org-chart tree from manager–report pairs and find the deepest node that is an ancestor of every node in a given set.

    Trees & Graphslowest-common-ancestorbinary-liftingtree-traversalinput-validation
  • System DesignHardModel answer
    Design a Remote Cloud Development Environment Service

    Design a scalable platform that provisions on-demand remote dev machines accessible via browser, SSH, or IDE tunnel, covering lifecycle, isolation, storage, multi-tenancy, and observability.

    System Designdistributed-systemsorchestrationmulti-tenancystorage
  • System DesignHardModel answer
    Streaming, Stop Signals, and Safe Recovery in an LLM Agent Pipeline

    Design end-to-end token streaming, user-initiated cancellation, and failure recovery for a multi-turn agent system where tools may have irreversible side effects.

    System Designstreamingcancellationfault-toleranceagents
  • Statistics & ExperimentsEasyModel answer
    Break-Even Analysis for Marketing Partnership Investments

    Determine the customer acquisition volumes needed to justify fixed and variable marketing costs against profitability targets.

    Statistics & Experimentsbreak-evenunit-economicsprofitabilitymarketing-roi
  • BehavioralHardModel answer
    Recover from a Silent Registration Pipeline Failure

    Design a prevention and mitigation plan for a premium registration pipeline that silently dropped thousands of sign-ups over multiple months without any alert firing.

    Behavioralincident responsedata reliabilitySLIs/SLOspipeline monitoring
  • Heaps, Sorting & SearchMediumAuto-graded
    Select Up to Three Books from Distinct Genres

    Tests greedy optimization with category constraints, hash-map aggregation, and heap-based top-k selection.

    Heaps, Sorting & Searchgreedyhashmapheapoptimization
  • Stacks & QueuesHardAuto-graded
    Simulate a FIFO Queue with Two Stacks

    Tests whether you can emulate first-in-first-out ordering using only two LIFO stacks and explain the amortized cost of each operation.

    Stacks & Queuesstacksqueueamortized-analysis
  • Arrays & HashingMediumAuto-graded
    Assign Minimum Consistent Ranks to Matrix Cells

    Tests greedy assignment of ranks by processing elements in sorted order while maintaining row and column constraints.

    Arrays & Hashingsortinggreedymatrix
  • Stacks & QueuesMediumAuto-graded
    Single-Threaded CPU: Exclusive Runtimes and Stack Snapshot

    Tests stack simulation and interval reasoning by computing per-function exclusive execution time and reconstructing the active call stack at a query timestamp from a sorted event log.

    Stacks & Queuesstacksimulationinterval-reasoning
  • Statistics & ExperimentsMediumModel answer
    Selecting Visualizations for Data Analysis

    Discuss which charts work best for different analytical goals, data types, and relationships during exploratory analysis.

    Statistics & Experimentsdata-visualizationexploratory-data-analysisstatisticscharts
  • System DesignMediumModel answer
    Curb Password Sharing on a Streaming Platform

    Design a product and policy strategy to reduce unauthorized account sharing on a subscription streaming service without alienating legitimate paying subscribers.

    System Designproduct-strategymonetizationexperimentationstreaming
  • Stacks & QueuesHardModel answer
    Build a Type-Safe C++ Stack from Raw Storage

    Implement a generic, dynamically growing C++ stack using raw memory and placement new, then defend every lifetime, allocation, and call-semantics decision.

    Stacks & QueuesC++memory-managementtemplatesobject-lifetime
  • Arrays & HashingMediumAuto-graded
    Layer-by-Layer Matrix Traversal Without Extra Storage

    Tests boundary-tracking traversal under strict space and immutability constraints, requiring careful handling of single-row and single-column edge cases.

    Arrays & Hashingmatrixtraversalconstant-spaceboundary-tracking
  • Stacks & QueuesMediumAuto-graded
    Bracket Nesting Check and Rotating Cipher

    Tests stack-based bracket validation and modular arithmetic to rotate lowercase letters circularly across the alphabet.

    Stacks & Queuesstacksstringsmodular-arithmetic
  • Stacks & QueuesMediumAuto-graded
    Calculate Arithmetic Expression with Negation and Grouping

    Tests building an operator-precedence parser using stacks to handle binary operations, unary negation, parentheses, and zero-truncating division.

    Stacks & Queuesstacksparsingoperator-precedencestring-processing
  • System DesignMediumModel answer
    Design a Distributed File Ingestion and Threat Analysis Platform

    Design an async, high-throughput system that ingests large files, fans out to multiple scan engines in isolation, and delivers a consolidated threat report.

    System Designdistributed-systemsasync-workflowssecurityobject-storage
  • System DesignMediumModel answer
    Building a Multi-Source Autocomplete System for Workplace Search

    Design the frontend and backend for a workplace search autocomplete that blends history, colleagues, files, applications, and filter chips in real time.

    System Designautocompletesearchfrontend-architecturebackend-design