KatInterview

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

Interview Practice Problems

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

5993
Problems
2220
Auto-graded
15
Topics
270
Added today

Showing 451–480 of 5993 results

  • Greedy & IntervalsMediumModel answer
    Staffing Timeline from Overlapping Work Shifts

    Turn a list of overlapping employee shifts into contiguous time segments, each listing who is on duty, with empty segments marking gaps in coverage.

    Greedy & Intervalssweep-lineintervalshash-mapsorting
  • BehavioralEasyModel answer
    Reviewing a Junior's React Component: Feedback and Refactors

    Walk through how you would review a junior engineer's messy React/TypeScript pull request: rank the issues, give feedback that teaches, propose refactors, request tests and plan follow-up.

    Behavioralcode-reviewmentoringreacttypescript
  • Greedy & IntervalsMediumAuto-graded
    Estimate Percentile from Histogram Buckets

    Linearly interpolate a percentile value across histogram buckets assuming uniform distribution within each interval.

    Greedy & Intervalsmathintervalshistogrampercentile
  • StringsMediumModel answer
    String Internals, Move Costs, and Threads vs Async Tasks

    Describe how a string is laid out in memory, what copying and moving really cost, what a Rust move does, and how OS threads differ from async coroutines.

    Stringsstringsmemory-managementmove-semanticsrust
  • Data Structure DesignMediumAuto-graded
    Replay a Sequence of Recency-Evicting Cache Commands

    Simulate a fixed-capacity cache that evicts the least recently used entry, replaying a list of get/put commands and returning each command's result.

    Data Structure Designlru-cachehash-maplinked-listsimulation
  • BehavioralMediumModel answer
    Behavioral Interview: Company Motivation, Best Project, and Continuous Learning

    Structure compelling answers for standard HR screening questions covering company motivation, your standout engineering project, recent work, and recent technical learning.

    Behavioralbehavioralcareercommunicationinterview-prep
  • Dynamic ProgrammingHardAuto-graded
    Fewest Cabinets for Two-Resource Jobs

    Group jobs with two resource demands into the fewest identical cabinets, using exact search with symmetry breaking and pruning (2D vector bin packing).

    Dynamic Programmingbin-packingbacktrackingbitmaskcombinatorial-optimization
  • Machine LearningMediumModel answer
    Greedy vs. Beam Search over a Next-Token Probability Table

    Decode a sequence from a bigram-style probability table using greedy search and beam search, and justify choices on ties, dead-ends, cycles, and length normalization.

    Machine Learningbeam-searchgreedy-decodingsequence-modelslog-probability
  • Math & Bit ManipulationMediumAuto-graded
    Smallest Palindrome Above a Given Number

    Find the smallest palindromic integer strictly larger than a non-negative integer, using the left half of the digits and carry handling, including the all-9s case.

    Math & Bit Manipulationpalindromedigitsmathcarry
  • Greedy & IntervalsMediumAuto-graded
    Sentinels on a Road: Best Covered Value With Single Left Steps

    Maximize the total value of covered towns on a line when each sentinel may step one town left at most once into an empty town, by finding which town each run of sentinels leaves uncovered.

    Greedy & Intervalsgreedystringsarrayssegments
  • System DesignMediumModel answer
    Design a 100x Scalable Distributed Task Scheduler

    Architect a flexible background job system capable of scaling 100-fold using partitioned time indices, hierarchical timing wheels, and resilient worker leasing.

    System Designsystem-designdistributed-systemsjob-schedulerqueues
  • Math & Bit ManipulationEasyAuto-graded
    Total of Numbers Sharing a Factor of 3, 5, or 7

    Compute the sum of integers from 1 to n divisible by at least one of 3, 5, or 7, counting each integer once, which tests overlap handling and inclusive bounds.

    Math & Bit Manipulationmathinclusion-exclusioniterationdivisibility
  • Arrays & HashingMediumAuto-graded
    Closest Response Times: List the Tightest Increasing Pairs

    Find the smallest absolute gap between any two readings, then list every strictly increasing pair achieving it, handling duplicates correctly. Tests sorting and adjacent-gap reasoning.

    Arrays & Hashingsortingarraysadjacent-differenceedge-cases
  • BehavioralHardModel answer
    Engineering Leader Loop: People, Execution, and Culture Answers

    Prepare a structured answer on leading an ML engineering org: conflict, underperformance, calibration, strategy under ambiguity, a project retrospective, and a values-driven company choice.

    Behavioralleadershippeople-managementexecutionml-infrastructure
  • Data Structure DesignMediumModel answer
    Upgrade a Streaming Log Filter to Multi-Code and JSON Output

    Refactor a small Python log-counting script so it filters on several status codes, optionally writes JSON, streams multi-gigabyte files in constant memory, and stays unit-testable.

    Data Structure Designpythonrefactoringstreamingcli
  • BehavioralMediumModel answer
    Career Story and First-Quarter Impact Plan for a New Role

    Present your career as a concise narrative with measurable results, then lay out a concrete 30/60/90-day plan to make your manager and new team more effective.

    Behavioralbehavioralleadershipcareer-narrativeonboarding
  • Data Structure DesignMediumAuto-graded
    Batch Simulator for a TTL-Aware Name Lookup Service with Aliases

    Simulate a batch of record insertions and lookups with normalized names, TTL expiry, alias-chain following, cycle and hop-limit detection, and A/alias exclusivity.

    Data Structure Designhash-mapsimulationdesignstring-normalization
  • SQL & DataMediumModel answer
    Best Click Rate Day and Peak ISO Week in an Ad Log Using Pivots

    Use Excel helper columns and PivotTables to find the day with the highest clicks per watch-minute and the ISO week with the most watch time, with deterministic tie-breaks.

    SQL & Dataexcelpivot-tableiso-weekratio-metrics
  • Trees & GraphsMediumAuto-graded
    Fastest Route Time Through a One-Way Street Network

    Find the minimum total cost between two nodes of a directed graph with non-negative edge weights, returning -1 if no route exists. Tests shortest-path reasoning with a priority queue.

    Trees & Graphsdijkstrashortest-pathgraphheap
  • Data Structure DesignMediumAuto-graded
    Live Complement Counting with Point Updates on One Array

    Answer repeated target-sum pair-count queries over two integer arrays while the second array receives point updates, using frequency maps.

    Data Structure Designhash-mapfrequency-countcounting-pairssimulation
  • System DesignHardModel answer
    Build a Topic-Based Notification Fan-Out Engine

    Design an object-oriented service that pushes news to topic subscribers with at-most-once delivery, effective unsubscribes and per-user per-topic ordering, scaling to millions of users.

    System Designpub-subnotificationsfan-outconcurrency
  • Statistics & ExperimentsHardModel answer
    Planning a Trustworthy Experiment for a New Signup Flow

    Plan an end-to-end experiment for a redesigned signup flow when invites cause spillover and signups vary by weekday, covering metrics, power, monitoring, ramp and ship decisions.

    Statistics & Experimentsab-testingexperimental-designinterferencepower-analysis
  • Machine LearningHardModel answer
    Designing LLM Search and Retrieval for High-Token Inputs and Corpus

    Architect an end-to-end RAG system capable of ingesting mega-documents and handling high-token, unstructured user inputs with low latency, strict permissions, and high citation fidelity.

    Machine Learningragllmsearchvector-database
  • Data Structure DesignMediumAuto-graded
    Ranked Staff Roster Across Multiple Forums with Swap-Down

    Simulate a batch of operations on per-forum ordered staff lists, enforcing seniority rules for adding, moving down one place, and removing members.

    Data Structure Designdesignhash-mapsimulationordered-list
  • BehavioralMediumModel answer
    Behavioral Stories for Senior-Plus Engineering Leadership Rounds

    Prepare structured answers to four senior-level behavioral prompts: setting direction, disagreeing with leadership, owning a failure, and growing other engineers.

    Behavioralbehavioralleadershipstaff-engineerstar-method
  • System DesignMediumModel answer
    Building a Reliable Multi-Channel Alert Pipeline With Safe Retries

    Design an alert platform that never silently drops a message, tolerates retries and reordering, and keeps users from seeing repeats across push, email, SMS and in-app channels.

    System Designsystem-designidempotencyretriesmessage-queues
  • Trees & GraphsMediumAuto-graded
    Sort a List and Replay Commands on a Binary Search Tree

    Sort an integer list without built-in sorting, then run a script of insert, search, delete and in-order commands on a duplicate-free binary search tree built from scratch.

    Trees & Graphsbinary-search-treequicksortrecursiontree-deletion
  • Data Structure DesignMediumModel answer
    Build a Heap Allocator with Fit Policies and Safe Handles

    Design a simulated memory manager over a fixed address range that supports two placement policies, splitting, merging of neighbors, and rejection of stale or forged release requests.

    Data Structure Designmemory-allocatorlinked-listhash-mapcoalescing
  • BehavioralMediumModel answer
    Fixing the Driver Licensing Office Visit: A Product Case

    Diagnose why visits to a motor vehicle licensing office frustrate customers, pick one problem, design a fix with a user journey, and define metrics and a pilot to prove it works.

    Behavioralproduct-senseproduct-designuser-journeymetrics
  • Arrays & HashingMediumAuto-graded
    Keep Words Whose Letter Multiset Appears More Than Once

    Filter a word list to the entries whose letter multiset is shared by at least two entries, keeping input order and duplicates, using letter-count keys.

    Arrays & Hashinghash-mapanagramscountingstrings