KatInterview

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

Interview Practice Problems

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

5991
Problems
2219
Auto-graded
15
Topics
270
Added today

Showing 421–450 of 5991 results

  • System DesignMediumModel answer
    Diagnosing a Latency or Throughput Regression in a Microservice Fleet

    Describe a disciplined, evidence-driven method for finding and fixing a slowdown in a multi-service system, from first signals through safe validation to long-term prevention.

    System Designobservabilitydebugginglatencydistributed-tracing
  • Heaps, Sorting & SearchMediumAuto-graded
    Locate a Value in a Cyclically Shifted Ascending List

    Search a cyclically shifted strictly increasing list of distinct integers for a value in O(log n), returning its index or -1, including unshifted and single-element cases.

    Heaps, Sorting & Searchbinary-searcharraysrotated-arraydivide-and-conquer
  • Stacks & QueuesMediumAuto-graded
    Infer Execution Events from Call Stack Snapshots

    Reconstruct chronological function START and END lifecycle events by evaluating structural differences across consecutive call stack snapshots.

    Stacks & Queuesstacks-queuesarraysstrings
  • Arrays & HashingEasyAuto-graded
    Group Identical Files by Content from an In-Memory Listing

    Group file entries that have identical byte content, using content length as a cheap first filter, and return only groups of two or more paths in a specified order.

    Arrays & Hashinghashinggroupingstringssimulation
  • Machine LearningMediumModel answer
    Assess and Launch an Edge AI Predictive Maintenance Model

    Define evaluation criteria, data sampling plans, and rollout gates for introducing a machine learning feature on edge devices.

    Machine Learningproduct-metricsevaluationedge-computingmodel-launch
  • System DesignHardModel answer
    Data Model for Course Reviews, Aggregates, and Moderation

    Design an online course review system covering completion checks, transactional rating aggregates, edit histories, and keyset-paginated read paths.

    System Designdatabase-designschema-designsystem-designsql
  • System DesignMediumModel answer
    Aggregating Three Upstream Services with Graceful Degradation

    Design a startup endpoint that resolves a user's internal ID, fans out to two dependent services, and still returns useful data when optional services fail or run slowly.

    System Designapi-designresiliencetimeoutspartial-failure
  • Arrays & HashingMediumAuto-graded
    Tally Contiguous Segments Matching a Goal Total

    Count contiguous non-empty segments of an integer array whose sum equals a goal, using running totals and a frequency map to handle negatives and zeros in linear time.

    Arrays & Hashingprefix-sumhash-mapsubarraycounting
  • System DesignMediumModel answer
    Design an Aggregated Flight Search Engine

    Design a large-scale flight search engine that aggregates dynamic fares from multiple third-party sources under low latency constraints.

    System Designsystem-designcachingdistributed-systemsapi-design
  • Greedy & IntervalsMediumAuto-graded
    Max Gains from Single and Multi-Trade Asset Strategies

    Calculate maximum achievable gain for an asset sequence under single-trade and unlimited-trade restrictions.

    Greedy & Intervalsarraysgreedydynamic-programming
  • Math & Bit ManipulationEasyAuto-graded
    Spread of a Number List: Population Variance

    Implement population variance on a list of numbers without external libraries, handling empty and single-element inputs and choosing a numerically sound approach.

    Math & Bit Manipulationvariancestatisticsfloating-pointarrays
  • Trees & GraphsEasyAuto-graded
    Distance Map to the Closest Exit in a Maze Grid

    Compute, for every cell of a grid with walls and exits, the fewest steps to the nearest exit, marking walls and cut-off cells as -1, using multi-source BFS.

    Trees & Graphsbfsgridmulti-source-bfsshortest-path
  • System DesignMediumModel answer
    Build a Restaurant and Dish Rating Service End to End

    Design a backend for browsing eateries, posting star ratings and written reviews, and keeping aggregates, search, and moderation trustworthy at scale.

    System Designsystem-designreviewssearchmoderation
  • Arrays & HashingEasyAuto-graded
    Simulate Key-Value Operations

    Process a series of insertion, update, and deletion instructions on a key-value store and return the final contents ordered by key.

    Arrays & Hashingarraysstringshash-table
  • Heaps, Sorting & SearchMediumAuto-graded
    Stable Divide-and-Conquer Sort of an Integer List

    Sort a list of integers in ascending order without mutating the input, using a divide-and-conquer merge approach that guarantees O(n log n) time and linear auxiliary space.

    Heaps, Sorting & Searchsortingdivide-and-conquermerge-sortstability
  • BehavioralMediumModel answer
    Four Core Stories for an Engineering Manager Conversation

    Build a small bank of structured stories covering a major project, mentoring, a disagreement, and a lasting improvement, and learn to deliver each in about two to three minutes.

    Behavioralbehavioralstar-methodleadershipmentoring
  • Machine LearningMediumModel answer
    Real-Time Harmful Content Screening for an Image-Sharing Platform

    Design an ML pipeline that screens uploaded images, captions and links for spam, phishing and unsafe imagery within a tight latency budget while keeping false positives low.

    Machine Learningml-system-designcontent-moderationclassificationclass-imbalance
  • Heaps, Sorting & SearchMediumAuto-graded
    Rank Selection Plus Longest Leave-Assisted Break

    Combines selecting the element at a 0-indexed rank in descending order with a sliding window finding the longest stretch containing at most a given number of workdays.

    Heaps, Sorting & Searchheapsliding-windowtwo-pointersorder-statistics
  • SQL & DataMediumAuto-graded
    Retail Reports: Product Revenue Stats and Regional Customer Ranks

    Emulate SQL-style reporting in Python: grouped mean and population stddev, NULL-to-zero mapping, inner joins across three tables, and RANK/DENSE_RANK within partitions.

    SQL & Datasqlgroup-byjoinswindow-functions
  • Machine LearningHardModel answer
    Taming Gradient Decay in a 40-Layer Net and a 100-Step RNN

    Explain why gradients shrink or blow up with depth and time, and design a combined fix using activations, initialization, skip connections, normalization, and gated or attention-based sequence models.

    Machine Learningvanishing-gradientsinitializationresidual-connectionsnormalization
  • SQL & DataMediumModel answer
    Campaign Profit by Segment and Gala Seat Filling in SQL

    Build per-campaign, per-segment fundraising metrics for August 2025 with fan-out-safe joins and cost allocation, pick the more profitable campaign, then choose extra gala invitees.

    SQL & Datasqlaggregationjoinswindow-functions
  • Heaps, Sorting & SearchMediumAuto-graded
    Identify Unique Zero-Sum Triples

    Find all distinct combinations of three elements in an integer sequence that sum to zero using two pointers and duplicate handling.

    Heaps, Sorting & Searcharraystwo-pointerssorting
  • System DesignMediumModel answer
    CPU Microarchitecture and Memory System: Ten-Topic Review

    Explain ten core architecture topics: OoO pipelines, gshare, register renaming, VLIW, coherence, load/store logic, COW, cache math, VIPT aliasing, and async FIFOs.

    System Designcomputer-architectureout-of-ordercachesbranch-prediction
  • StringsMediumAuto-graded
    Words Spelled by a Finger Trace Across Keys

    Find all dictionary words that fit a key trace as a start- and end-anchored subsequence where letters may reuse a key, using a next-occurrence table to match many words efficiently.

    Stringsstringssubsequencegreedyprecomputation
  • Trees & GraphsHardModel answer
    Region-Splitting Tree and Multi-Word Grid Search

    Compress a square character grid into a four-way region tree, then locate a batch of words in the grid by walking neighbors in eight directions without reusing cells.

    Trees & Graphsquadtreetriebacktrackingdivide-and-conquer
  • StringsMediumAuto-graded
    Resolve Nested %NAME% Placeholders with Cycle Detection

    Expand %NAME% placeholders whose values may reference other placeholders, handling %% escapes, missing names, and circular references.

    Stringsparsingdfsmemoizationcycle-detection
  • Dynamic ProgrammingMediumAuto-graded
    Counting Sorted Sequences With Prescribed Digit Sums

    Count non-decreasing sequences of integers in [0, 5000] whose i-th element has a given digit sum, using DP over candidate values with prefix sums, modulo 1,000,000,007.

    Dynamic Programmingdynamic-programmingprefix-sumstwo-pointerscounting
  • BehavioralMediumModel answer
    ML Engineer Screen: Self-Pitch, Motivation, and API Contract Talk

    Prepare a spoken answer covering an ML-focused intro, motivation for a mission-driven startup, an API contract mix-up story, None vs empty return semantics, and questions for the interviewer.

    Behavioralbehavioralml-engineercommunicationapi-design
  • 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