KatInterview

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

Interview Practice Problems

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

6066
Problems
2248
Auto-graded
15
Topics
275
Added today

Showing 1651–1680 of 6066 results

  • Dynamic ProgrammingHardAuto-graded
    Trim Letters to Reach a Mirror String Within a Budget

    Decide whether a string can become a palindrome after removing no more than k characters, testing interval dynamic programming and palindromic subsequence reasoning.

    Dynamic Programmingdynamic-programmingpalindromestringssubsequence
  • Dynamic ProgrammingMediumAuto-graded
    Count Step Sequences with Custom Prime Jumps

    Find the number of unique sequences of steps to reach a target using 1-unit steps or prime steps ending in digit 3.

    Dynamic Programmingdynamic-programmingmathsievemodular-arithmetic
  • System DesignMediumModel answer
    Making External Payment Integration Resilient to Retries and Network Drops

    Analyze a buggy payment handler, explain why database transactions fail to solve distributed state issues, and design a resilient flow using idempotency and background reconciliation.

    System Designsystem-designdistributed-systemsidempotencypayments
  • Trees & GraphsMediumAuto-graded
    Trace a Phrase Through Neighboring Tiles

    Decide whether a string can be traced through a rectangular letter grid by stepping to up/down/left/right neighbors without reusing a cell, using backtracking search.

    Trees & Graphsbacktrackingdfsmatrixpruning
  • Trees & GraphsMediumAuto-graded
    Deepest Shared Ancestor of Two Nodes in a Rooted Tree

    Find the deepest node whose subtree contains two given nodes in a tree stored as child lists, using a single depth-first pass that stays safe on very deep trees.

    Trees & Graphstreedfslowest-common-ancestorpost-order
  • SQL & DataMediumAuto-graded
    Daily SHOP vs WEBSITE Revenue Mix and Efficiency Report

    Aggregate two event tables over a 30-day window, fill missing rows with zeros, and compute safe-division shares and revenue-per-conversion per day and destination.

    SQL & Dataaggregationhash-mapdate-windowdata-manipulation
  • Data Structure DesignMediumAuto-graded
    Replay a Typing Session Against a Ranked Suggestion History

    Simulate keystroke-by-keystroke search suggestions over a frequency-weighted history that grows as queries are committed, ranking the top 3 matches by count and then text.

    Data Structure Designhash-mapdesignstring-prefixtop-k
  • Trees & GraphsMediumAuto-graded
    Cheapest Transit Pick on a Lettered Street Grid

    Run a per-mode BFS on a grid to find step counts, then choose the mode with least total time, then least total cost, then smallest index.

    Trees & Graphsbfsgridshortest-pathtie-breaking
  • System DesignHardModel answer
    Design a Streaming LLM Output Architecture

    Design a scalable backend architecture for real-time AI token streaming featuring resume capability, low latency, prompt cancellation, and fault isolation.

    System Designsystem-designstreamingllmredis
  • Machine LearningMediumModel answer
    From Raw Text to Tokens: Subword Tokenizers and Modern LLM Blocks

    Describe how subword tokenizers such as SentencePiece work, what a Transformer block contains, and why recent LLMs replaced parts of the original design with RMSNorm, RoPE, and MoE.

    Machine Learningtokenizationtransformerssentencepiecerope
  • BehavioralMediumModel answer
    Reflecting on a Key Technical Project: Architecture, Impact, and Trade-offs

    Prepare a structured, deep-dive response covering the technical choices, failure modes, leadership, and metrics of your most significant recent engineering project.

    BehavioralBehavioralSystem DesignLeadershipTechnical Deep Dive
  • Greedy & IntervalsMediumAuto-graded
    Even Budget Split Under Per-Person Caps

    Split a budget as evenly as possible among people with individual caps, using a binary-searched fill level plus a lowest-index-first remainder rule.

    Greedy & Intervalsgreedybinary-searchwater-fillingarrays
  • Statistics & ExperimentsMediumModel answer
    Evaluating an Automated Bid Optimizer in an Ad Marketplace

    Design an evaluation plan for an ML-driven auto-bidding tool: choose metrics, set up a randomized experiment, and handle marketplace interference and selection bias.

    Statistics & Experimentsexperiment-designcausal-inferencemarketplace-interferencemetrics
  • Statistics & ExperimentsMediumModel answer
    Spotting Automated Accounts from a Comment Event Log

    Design behavioral features from a comment log to flag automated accounts, choose a classification cutoff without clean labels, and check that heavy human users are not unfairly caught.

    Statistics & Experimentsanomaly-detectionfeature-engineeringthreshold-selectionfairness-validation
  • System DesignMediumModel answer
    Load Instruction Walkthrough: TLB Miss, Page Walk, L1 Cache Hit

    Decode a 48-bit virtual address under 4-level paging, trace a load through a TLB miss and page walk to an L1 hit, and say where read permission is checked.

    System Designvirtual-memorytlbpage-tablecpu-cache
  • StringsEasyAuto-graded
    Match Words to a Keypad Number Sequence

    Given a word list and a string of keypad digits, return the sorted words whose letters map to exactly that digit sequence, testing string encoding and filtering.

    Stringsstringshashingsortingsimulation
  • Arrays & HashingMediumAuto-graded
    Count Disjoint Pairs That Add Up to a Goal Value

    Find the most disjoint pairs in an integer list whose sum equals a goal, using value counts or sorting with two pointers, while handling duplicates, negatives and the half-goal case.

    Arrays & Hashinghash-maptwo-pointersgreedycounting
  • Data Structure DesignMediumModel answer
    Build a Bucketed Spatial Index for Planar Points

    Implement a region quadtree that stores 2D points in capacity-limited buckets, splits into four quadrants on overflow, and answers rectangular range queries efficiently.

    Data Structure Designquadtreespatial-indexrecursionrange-query
  • Heaps, Sorting & SearchMediumAuto-graded
    Locate the K-th Dominant Value

    Find the k-th largest integer in an unsorted list efficiently using quickselect or priority queues.

    Heaps, Sorting & Searchheaps-sortingarraysquickselect
  • Heaps, Sorting & SearchMediumAuto-graded
    Find Unique Combination Triples for Target Sum

    Find all distinct non-decreasing 3-element value combinations in an array that add up to a specified target value.

    Heaps, Sorting & Searcharrayssortingtwo-pointers
  • Statistics & ExperimentsHardModel answer
    Should a Burger Chain Add a Plant-Based Patty? Decide and Test

    Decide whether a burger chain should add a plant-based sandwich after a rival's hit, then design a store-level experiment and a pre-committed launch rule.

    Statistics & Experimentsexperiment-designdifference-in-differencescannibalizationpower-analysis
  • System DesignMediumModel answer
    Design an Ultra-Low Latency Distributed Link Shortening Platform

    Architect a scalable, high-availability URL shortener capable of handling heavy read workloads, instant redirects, custom aliases, and automated TTL cleanup.

    System Designsystem-designdistributed-systemscachingdatabase-design
  • System DesignMediumModel answer
    Rerun-Safe Monthly Churn Pipeline with Late Events

    Design a daily pipeline that turns streaming subscription events into month-end churn and retention metrics, tolerating late data, safe reruns, 12-month backfills, and changing metric definitions.

    System Designetlidempotencyscd-type-2late-arriving-data
  • System DesignMediumModel answer
    Core CS Fundamentals: Object Polymorphism, Search Trees, and AI Tooling

    Demonstrate core computer science concepts by explaining object-oriented polymorphism, binary search tree mechanics with complexities, and responsible workflows for AI-assisted software engineering.

    System Designobject-oriented-programmingbinary-treesai-toolscs-fundamentals
  • BehavioralMediumModel answer
    End-to-End Analytical Workflow and Data Tooling

    Learn how to present a structured, end-to-end data analysis and visualization narrative that balances technical execution, validation rigor, and business impact.

    Behavioraldata-analysispythonsqlvisualization
  • Statistics & ExperimentsMediumModel answer
    Testing a New Ad Ranker in a Budget-Limited Marketplace

    Design an experiment for a new ad-ranking model in a two-sided marketplace, covering randomization, mixed CTR/CVR results, shared advertiser budgets, and guardrail metrics.

    Statistics & Experimentsab-testingmarketplace-experimentsinterferenceads
  • Stacks & QueuesMediumAuto-graded
    Validate Deep Structure Equivalence

    Recursively or iteratively check if two arbitrarily nested data structures are identical in type, shape, and value.

    Stacks & Queuesrecursionstackdata-structureshashing
  • SQL & DataHardModel answer
    Measuring a Premium Plan Launch and Building Fraud Alert Rules

    Define launch success for a new paid tier using only transaction and activity tables, then design a rule-based SQL alerting system for suspicious payments.

    SQL & Dataproduct-analyticscohort-retentionsql-window-functionsfraud-rules
  • Data Structure DesignMediumModel answer
    Build a Bounded Permit Task Execution Engine

    Implement a concurrency manager that controls variable permit usage per task, supports blocking and asynchronous execution, and guarantees safe permit releases.

    Data Structure Designconcurrencysynchronizationdesign-dsthreading
  • Machine LearningMediumModel answer
    Why Identical Starting Weights Stall Neural Network Training

    Analyze what happens when a feed-forward network starts with every weight and bias at zero, how symmetry persists, and why random scaled initialization resolves it.

    Machine Learningweight-initializationbackpropagationsymmetry-breakingxavier-he