KatInterview

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

Interview Practice Problems

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

6119
Problems
2267
Auto-graded
15
Topics
271
Added today

Showing 3331–3360 of 6119 results

  • Greedy & IntervalsMediumAuto-graded
    Count Active Ranges at Query Points

    Tests whether a candidate can efficiently count how many inclusive ranges cover each of a set of query values using binary search decomposition.

    Greedy & Intervalsbinary-searchintervalssorting
  • Math & Bit ManipulationEasyAuto-graded
    Factorial Trailing Zeros Without Building the Factorial

    Count the base-10 trailing zeros of n! by tallying factors of 5, never constructing the enormous factorial itself.

    Math & Bit Manipulationmathnumber-theoryfactorialcounting
  • System DesignEasyModel answer
    For Loop vs While Loop: Picking the Right Tool

    Explain when to reach for a for loop versus a while loop, covering intent, safety, and how each choice affects the risk of infinite loops.

    System Designcontrol-flowloopsreadabilitypython
  • StringsMediumAuto-graded
    Interleave Characters from String Ends

    Rebuild a string by alternately picking characters from opposite ends until all are consumed, testing two-pointer convergence logic.

    Stringstwo-pointersstring-manipulationarray
  • System DesignEasyModel answer
    Investigating High CPU Usage on a Linux System

    Walk through the steps to identify and verify the cause of elevated CPU consumption on a Linux machine, from system-wide metrics to specific code paths.

    System Designlinuxperformancedebuggingmonitoring
  • System DesignMediumModel answer
    Build a Multi-Sink Logging Pipeline with Fault Isolation

    Design a thread-safe in-process logger that fans out immutable log records to independent handlers with isolated failures, runtime reconfiguration, and bounded async buffering.

    System Designconcurrencyloggingsystem-designpython
  • System DesignHardModel answer
    Architecting a Streaming LLM Chat Front End

    Design a browser client that streams model output into a virtualized, richly formatted chat log while surviving dropped connections and branching edits.

    System Designfrontendstreamingvirtualizationstate-management
  • BehavioralMediumModel answer
    Ace the Technical Screen Opener: Intro, Fit, Logistics, and Pay

    Structure a strong opening segment by delivering a focused self-introduction, genuine motivation, clear logistics, grounded compensation expectations, and sharp questions for the team.

    Behavioralself-introductioncompensationcommunicationmotivation
  • Machine LearningHardModel answer
    Audit a Feature Pipeline for Silent Failures, Then Design for Freshness

    Spot every category of production risk in a passing-tests feature pipeline PR, then choose the right serving architecture for batch, near-real-time, and request-time features.

    Machine Learningfeature engineeringtraining-serving skewfeature storeML infrastructure
  • System DesignMediumModel answer
    Repair Async Watch-List Add/Remove Endpoints

    Debug failing REST handlers that add and remove movies in a watch list, fixing check ordering, ID comparison, persistence timing, and status codes.

    System Designdebuggingrest-apihttp-status-codesasync-persistence
  • BehavioralMediumModel answer
    Navigating a Project When the Scope Isn't Clear

    Describe how you make progress and keep stakeholders aligned when a project starts without well-defined requirements or direction.

    Behavioralambiguitystakeholder communicationproject management
  • Trees & GraphsMediumModel answer
    Count All Valid 4×4 Three-in-a-Row Game Sequences

    Use recursion and backtracking to enumerate every ordered move sequence on a 4×4 board where three consecutive marks (not four) wins.

    Trees & Graphsbacktrackingrecursiongame-treecombinatorics
  • SQL & DataMediumModel answer
    Master SQL Window Functions: Ranking, Running Totals, and Gap-Fill

    Write analytical SQL queries using only window functions — no self-joins — to compute running totals, forward-fill sparse events, and rank users within groups.

    SQL & Datawindow-functionsrankingrunning-totalforward-fill
  • System DesignHardModel answer
    Running a Structured Code Review Under Time Pressure

    Walk through a repeatable framework for producing high-signal PR feedback — prioritized, clearly labeled, and written with minimal context — in roughly 20–30 minutes.

    System Designcode reviewengineering fundamentalscommunicationsoftware design
  • SQL & DataMediumModel answer
    Food Platform Analytics: Basket Pricing and Order Metrics

    Design functions to find the best-priced restaurant for a shopping cart, calculate revenue metrics over time windows, and identify top orders and items.

    SQL & Datadata-structuresaggregationwindow-queriesheap
  • System DesignHardModel answer
    Building a DAG Workflow Engine on Kubernetes

    Design a Kubernetes-native system that schedules containerized DAG tasks with dependency ordering, retries, durable state, and multi-tenant isolation.

    System Designkubernetesworkflow-orchestrationdag-schedulingreliability
  • Dynamic ProgrammingMediumAuto-graded
    Fewest Coins to Form Target Sum

    Tests dynamic programming with unbounded resources to compute the minimal coin count for a target value, handling impossible cases.

    Dynamic Programmingdynamic-programmingcoin-changeoptimization
  • Statistics & ExperimentsHardModel answer
    Sampling Strategy for Estimating Classifier Accuracy with a Fixed Review Budget

    Given a fixed number of human labels, decide whether to label more examples once each or fewer examples multiple times, and quantify the uncertainty either way.

    Statistics & Experimentsstatisticsmachine-learningexperimental-design
  • BehavioralMediumModel answer
    Senior PM Behavioral: Ownership, Influence, and Tough Feedback

    Practice four senior-level behavioral prompts covering unconventional problem-solving, stakeholder conflict, scope ownership, and receiving hard feedback.

    BehavioralleadershipSTARstakeholder-managementprogram-management
  • Machine LearningHardModel answer
    Designing a Sample-Wise Double Descent Experiment in Linear Regression

    Design and analyze a synthetic linear regression experiment that demonstrates how test error spikes near the interpolation threshold as sample size varies.

    Machine Learningdouble descentgeneralizationlinear regressionbias-variance
  • Machine LearningHardModel answer
    Value Functions and the Recursive Structure of MDPs

    Derive and interpret the recursive equations that relate current value to immediate rewards and future expected value in reinforcement learning.

    Machine Learningreinforcement-learningmdpvalue-functionsdynamic-programming
  • Arrays & HashingHardAuto-graded
    Maximize Total Distinct Values Across Two Arrays

    Tests greedy reasoning, frequency counting, and backtracking search to maximize the combined distinct-value count across two arrays given a limited swap budget.

    Arrays & Hashingbacktrackinggreedyfrequency-counting
  • System DesignHardModel answer
    Design a Trending Content Feed with Near-Real-Time Ranking

    Architect a system that ranks articles by engagement velocity with 1–2 minute freshness, covering ingestion, streaming aggregation, storage tiers, and cheap high-QPS serving.

    System Designstreamingrankingcachingkafka
  • Linked ListsMediumAuto-graded
    Walking Both Ways to Measure a Doubly Linked Chain

    Given neighbor links for a group of disjoint chains, count how many nodes sit in the chain containing a given start node.

    Linked Listslinked-listtraversaltwo-pointerssimulation
  • BehavioralMediumModel answer
    Behavioral: Motivation, Integrity, and Technology Awareness

    Demonstrate your interest in a tech organization, describe handling a problem you noticed, and discuss emerging technology trends relevant to the business.

    Behavioralbehavioralleadershipcommunication
  • Statistics & ExperimentsEasyModel answer
    Is a 65% Conversion Rate Proof a Campaign Beat Its 60% Target?

    Run a one-sided proportion test on 65 conversions out of 100 to decide whether a campaign's true conversion rate exceeds a 60% benchmark.

    Statistics & Experimentshypothesis-testingconfidence-intervalsproportions
  • BehavioralMediumModel answer
    Behavioral Screen: Eight Core Competencies in One Round

    Practice answering the eight behavioral prompts most common in engineering screens: intro, ambiguity, conflict, failure, influence, prioritization, feedback, and motivation.

    Behavioralbehavioralcommunicationleadershipteamwork
  • Heaps, Sorting & SearchMediumModel answer
    Minimum-Distance Depot Placement on a Grid with Blocked Cells

    Place a depot on a 2D integer grid to minimize total Manhattan distance to all warehouses, avoiding any cell occupied by an obstacle.

    Heaps, Sorting & Searchmanhattan-distancemedianpriority-queueprefix-sums
  • Data Structure DesignMediumModel answer
    Build a Task Registry and Content-Based Duplicate Finder

    Design an in-memory task manager with per-user quotas, priority ordering and audit trails, then detect duplicate files using size filtering and streaming hashes.

    Data Structure Designhash-mapssorted-containersfilesystemhashing
  • Machine LearningHardModel answer
    Confusion Matrix Rates, Sigmoid Forward Pass, and Activation Choice

    Work through a screening-style ML set: pick the confusion matrix matching target TPR/FPR, hand-compute a sigmoid neuron, and justify activation choices per layer.

    Machine Learningconfusion-matrixrocsigmoidactivation-functions