KatInterview

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

Interview Practice Problems

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

6029
Problems
2232
Auto-graded
15
Topics
273
Added today

Showing 1051–1080 of 6029 results

  • Trees & GraphsMediumAuto-graded
    Minimum Degrees of Separation in a Social Network

    Determine the shortest path distance between two nodes in an unweighted, undirected graph using Breadth-First Search.

    Trees & Graphsbfsgraphshortest-pathhash-map
  • Heaps, Sorting & SearchMediumAuto-graded
    Pick the Rank-k Score From the Top

    Select the k-th largest value, counting duplicates separately, from an unsorted integer list without a full sort, using quickselect or a bounded heap.

    Heaps, Sorting & Searchquickselectheapselectionpartitioning
  • Trees & GraphsMediumAuto-graded
    Multi-Hop Currency Conversion Over a Rate Table

    Compute a conversion factor between two currencies by chaining and inverting listed rates, returning -1.0 when no chain exists; tests graph traversal with multiplicative weights.

    Trees & Graphsgraphbfshash-mapweighted-edges
  • System DesignEasyModel answer
    Troubleshooting High Latency in a Production Microservice

    A guide on investigating and resolving a sudden 15x latency spike on a critical path service in a Kubernetes environment.

    System Designincident-responsesreobservabilitykubernetes
  • Trees & GraphsMediumAuto-graded
    Suggest Top Social Connection

    Find the non-adjacent node in an undirected graph with the maximum count of shared neighbors relative to a target node.

    Trees & Graphsgraphsbfshash-tablesocial-network
  • Heaps, Sorting & SearchMediumAuto-graded
    Compute Safe Summary Statistics for Numeric Series

    Computes min, mean, and median robustly for floating-point data, handling missing/invalid values and large magnitude edge cases safely.

    Heaps, Sorting & Searchheaps-sortingarraysmath-bits
  • Data Structure DesignMediumModel answer
    BST In-Order Traversal Flow & Priority Queue Dispatcher

    Implement an in-order tree iterator with memory constrained by height, followed by a priority queue that handles multi-attribute ordering rules.

    Data Structure Designtreesstackheappriority-queue
  • Math & Bit ManipulationMediumModel answer
    Compute Courier Compensation for Delivery Trips

    Calculate total delivery earnings from start/end times and distances using conditional rates, rush-hour multipliers, and precision rules.

    Math & Bit Manipulationmathparsingsimulation
  • Dynamic ProgrammingMediumAuto-graded
    Prime Segment Partitions of a Digit Sequence

    Count the ways to cut a digit string into prime-valued pieces without leading zeros, using prefix dynamic programming plus a fast primality check, modulo 1,000,000,007.

    Dynamic Programmingdynamic-programmingprimality-teststringscounting
  • System DesignMediumModel answer
    Designing a Flash-Sale Ticketing Platform That Never Double-Sells

    Design a ticketing platform that survives a sudden surge when sales open, holds seats during checkout, and guarantees no ticket is ever sold to two buyers.

    System Designsystem-designconcurrencyrate-limitinginventory
  • Math & Bit ManipulationEasyAuto-graded
    Token Hop Around a Ring

    Compute where a token lands on a ring after k escalating hops, which tests spotting a prefix-sum closed form with modular arithmetic instead of simulating.

    Math & Bit Manipulationmathmodular-arithmeticsimulationclosed-form
  • System DesignMediumModel answer
    Fresh Food Stock and Fleet Tracking Platform Design

    Design a backend that follows perishable stock across warehouses and trucks, answers nearest-and-soonest-expiring queries, prevents overselling, and raises expiry warnings.

    System Designsystem-designgeospatialstreaminginventory
  • SQL & DataHardModel answer
    Analyzing Noisy A/B Experiment Metrics and SRM in SQL

    Write SQL queries to censor crossover exposures, compute 14-day conversion metrics under blackout constraints, and calculate an SRM chi-square p-value.

    SQL & DataSQLA/B TestingExperimentationWindow Functions
  • Arrays & HashingMediumAuto-graded
    Equicorrelation Floor, Reverse Slope, and Max-Min Covariance

    Combine three closed-form statistics results: the lowest shared correlation of three variables, a reverse regression slope from R² and a slope, and the covariance of the max and min of two uniforms.

    Arrays & Hashingcorrelationlinear-regressionorder-statisticscovariance
  • BehavioralMediumModel answer
    Project Deep Dive and Relocation Readiness Walkthrough

    Present your current role, break down your most ambitious project from goals to business results, and answer clearly about relocating, including preferred places, timing and limits.

    Behavioralbehavioralproject-deep-divecommunicationownership
  • BehavioralMediumModel answer
    Describe Your Greatest Impact and an Unplanned Technical Innovation

    Structure a response covering a high-impact technical initiative and an accidental innovation, demonstrating senior-level ownership, trade-offs, and measurable organizational outcomes.

    Behavioralbehavioralleadershipimpactcareer-narrative
  • Machine LearningMediumModel answer
    Present a Production ML Project You Owned, Start to Finish

    Describe a machine learning project you led, covering problem, metrics, data, modeling, validation, deployment, your role, results and lessons, in a way a hiring panel can probe.

    Machine Learningml-projectleadershipmetricsdeployment
  • Heaps, Sorting & SearchMediumAuto-graded
    Running Leaderboard of the K Largest Readings

    Process paired operation and value lists, tracking the K largest integers seen so far and recording a descending snapshot after every operation, using a bounded min-heap.

    Heaps, Sorting & Searchheapstreamingtop-kpriority-queue
  • BehavioralMediumModel answer
    Aligning Cross-Functional Partners When Opinions Collide

    Walk through a project where you led a cross-team effort, reconciled conflicting priorities with evidence, and steered the group to a decision and a measurable result without formal authority.

    Behavioralbehavioralstakeholder-managementconflict-resolutioninfluence
  • Data Structure DesignMediumAuto-graded
    Priority Job Scheduler with Cancellation

    Simulate a scheduler that adds, cancels, and runs jobs by priority with FIFO tie-breaking, using lazy deletion on a heap so each operation stays logarithmic.

    Data Structure Designheappriority-queuelazy-deletionhash-map
  • BehavioralHardModel answer
    Leading a Ranking Project: Technical Defense and People Stories

    Prepare a manager-level walkthrough of a search relevance project plus four people-leadership stories, tying modeling choices and experiments to business results and team outcomes.

    Behavioralbehavioralleadershipsearch-rankingstar-method
  • Arrays & HashingEasyAuto-graded
    Peak Request Load Over a Fixed Run of Minutes

    Find the largest total of any k consecutive values in a list, testing fixed-size sliding window technique and the ability to avoid recomputing overlapping sums.

    Arrays & Hashingsliding-windowarraysprefix-sum
  • BehavioralMediumModel answer
    Analyzing a Production GenAI Failure and Designing Guardrails

    Walk through a real or realistic production Generative AI system failure, detailing the root-cause analysis, algorithmic remediation, evaluation rigor, and ongoing observability.

    Behavioralgenerative-airagsystem-designroot-cause-analysis
  • BehavioralMediumModel answer
    Narrating a Project You Owned: Scope, Decisions, Impact

    Explain a past engineering project from start to finish: the problem, your exact role, key decisions and trade-offs, measurable results, and what you would do differently.

    Behavioralbehavioralownershipproject-deep-divetrade-offs
  • Machine LearningHardModel answer
    Targeting a Delivery-Fee Promo with an Uplift Model

    Design an end-to-end uplift system that picks which 20% of users get a free-delivery offer, covering experiments, modeling, evaluation, budgeted selection, fairness, interference and sequential testing.

    Machine Learninguplift-modelingcausal-inferenceexperimentationqini
  • Data Structure DesignMediumAuto-graded
    Subtree Access Rights Simulator for Advertiser Groups

    Simulate a log of grant, revoke and check operations on a rooted group tree, where a grant on a node also covers every node beneath it.

    Data Structure Designtreehash-setsimulationancestor-walk
  • Math & Bit ManipulationEasyAuto-graded
    Simple Interest Earned on a Short-Term Loan

    Compute the interest earned on a loan using a simple (non-compounding) annual percentage rate prorated over a number of months.

    Math & Bit Manipulationmathsimple-interestarithmeticfinance
  • BehavioralMediumModel answer
    Senior Behavioral Screen: Success, Conflict, Shifting Mindsets, and Work Culture

    Prepare structured responses for four core behavioral themes: impactful execution, handling interpersonal conflict, reconsidering a peer, and identifying key cultural values.

    Behavioralbehavioralleadershipconflict-resolutiongrowth-mindset
  • Math & Bit ManipulationEasyAuto-graded
    Pricing Two Coin-Editing Tools in a Four-Coin Game

    Compute a baseline expected payoff and the fair prices of two coin-editing tools, using linearity of expectation, a parity invariant, and an absorbing-state argument.

    Math & Bit Manipulationprobabilityexpected-valueparity-invariantmarkov-chain
  • Trees & GraphsHardModel answer
    Shortest Hop Count Through a Flaky Web Graph

    Crawl a website graph from a start URL to an exit page using BFS, retrying transient 5xx failures a limited number of times, and return the minimum hop count or -1.

    Trees & Graphsbfsgraph-traversalretry-logicvisited-set