KatInterview

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

Interview Practice Problems

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

6033
Problems
2234
Auto-graded
15
Topics
274
Added today

Showing 4891–4920 of 6033 results

  • Statistics & ExperimentsHardModel answer
    Streaming Quantile Estimation with Bounded Rank Error

    Build a space-efficient quantile estimator for unbounded streams and explain deterministic rank guarantees versus probabilistic centroid methods.

    Statistics & Experimentsstreaming-algorithmsquantilesapproximationdata-structures
  • Trees & GraphsMediumAuto-graded
    Lexicographically Smallest Schedule or Detect a Deadlock

    Tests Kahn's algorithm with a min-heap to produce the lexicographically smallest valid processing order across nodes in a directed dependency graph, or detect a cycle.

    Trees & Graphstopological-sortgraphsheap
  • System DesignMediumModel answer
    Building a Live Hashtag Popularity Ranking Service

    Design a backend that ingests social media posts at scale, computes time-sensitive popularity scores for hashtags, and serves a constantly updated list of what's trending.

    System Designstream-processingdistributed-systemsrankingreal-time
  • Data Structure DesignMediumModel answer
    Queue Abstraction Design with Multiple Backing Structures

    Design a queue interface and implement it using different data structures, analyzing trade-offs between linked lists, arrays, and stacks.

    Data Structure Designobject-oriented-designdata-structurestrade-offs
  • Arrays & HashingMediumAuto-graded
    Zero-Sum Triplets in an Array

    Tests two-pointer technique on sorted arrays, duplicate avoidance, and quadratic complexity optimization for finding triplet combinations.

    Arrays & Hashingtwo-pointerssortingarray-traversal
  • System DesignMediumModel answer
    Build a Large-Scale Web Crawler Architecture

    Design a distributed crawler that fetches and processes billions of web pages weekly while respecting rate limits and avoiding duplicate work.

    System Designdistributed-systemsscalabilitycrawling
  • Data Structure DesignHardAuto-graded
    Sliding-Window Event Counter with a Circular Bucket Buffer

    Design a fixed-memory event counter using a ring buffer of per-second buckets that tracks how many events fell inside a trailing 15-minute window.

    Data Structure Designring-buffersliding-windowdesignsimulation
  • SQL & DataMediumModel answer
    Rebooking Rate After Initial Cancellation

    Calculate what fraction of users whose earliest appointment was cancelled never scheduled another confirmed or returned appointment afterward.

    SQL & Datasqlwindow-functionsctecohort-analysis
  • System DesignHardModel answer
    Auditing a Parcel-Routing Scheduler: Bugs, Structures, and Concurrency

    Review a Python parcel-routing codebase for correctness bugs, complexity bottlenecks, and thread-safety failures, then propose concrete fixes for each.

    System Designcode-reviewconcurrencydata-structurescomplexity
  • System DesignHardModel answer
    Build a Large-Scale Job Scheduling System

    Design a fault-tolerant distributed system that executes millions of scheduled tasks with configurable timing, retry logic, and multi-tenant isolation.

    System Designdistributed-systemshigh-availabilityscalability
  • Machine LearningMediumModel answer
    Multi-Stage Retrieval System for Document Search

    Design a scalable retrieval and ranking pipeline for querying 10M documents under 2s latency at 500 QPS with permission enforcement.

    Machine Learningretrievalrankingragembeddings
  • Trees & GraphsMediumAuto-graded
    Spell Words Along Connected Paths in a Letter Grid

    Tests backtracking DFS with trie-based pruning to find all words from a large list that can be traced through edge-adjacent, non-repeating cells in a 2-D letter grid.

    Trees & Graphsbacktrackingtriedfs
  • BehavioralHardModel answer
    Navigating Uncertainty and Owning the Outcome

    Describe handling an unclear analytics challenge with missing information and time pressure, including framing, analysis, stakeholder management, and post-launch correction.

    Behavioraldecision-makingleadershipcommunicationaccountability
  • Arrays & HashingMediumAuto-graded
    Sliding Window Average over an Integer Sequence

    Tests whether a candidate can compute consecutive fixed-width window averages in O(n) time by maintaining a running sum instead of recomputing each window from scratch.

    Arrays & Hashingsliding-windowarraystwo-pointers
  • StringsMediumModel answer
    Compile a Mini Language to Three-Address Code

    Parse a small line-based language of assignments and flat if-else blocks, then emit a deterministic three-address IR with temporaries and jump labels.

    Stringsparsingcompilerintermediate-representation
  • StringsMediumAuto-graded
    Text Substitution with Whole-Word Match and Longest-Prefix Priority

    Apply a phrase-to-replacement map on the original text in one pass, respecting whole-word boundaries and preferring longer matches.

    Stringstriegreedystring-matching
  • Stacks & QueuesMediumAuto-graded
    Lexicographically Smallest Digit Sequence from Rise/Fall Pattern

    Tests greedy thinking and stack-based reversal to build the smallest digit string satisfying a sequence of increase and decrease constraints.

    Stacks & Queuesgreedystackstrings
  • StringsEasyAuto-graded
    Scale Serving Sizes in a Shopping List

    Tests careful string parsing: multiply only the leading numeric token in each line while leaving the rest of the text exactly as-is.

    Stringsstringsparsinglist manipulation
  • Statistics & ExperimentsMediumModel answer
    Designing and Measuring a Similar Item Alert System

    Design a notification feature for a peer-to-peer resale platform that alerts buyers when similar items are listed, then create an experiment to measure its impact.

    Statistics & Experimentsexperimentationproduct-metricscausal-inference
  • SQL & DataMediumModel answer
    Pairing Clock-In and Clock-Out Records Across Calendar Days

    Calculate daily hours worked per employee from timestamp-based clock events, handling midnight transitions and data anomalies.

    SQL & Datasqlwindow-functionstime-seriesdata-quality
  • System DesignHardModel answer
    Build a Pipeline Execution Platform for Thousands of Tenants

    Design a scalable, multi-tenant CI/CD system that runs Git-triggered job pipelines with strong isolation, fair scheduling, live log streaming, and per-tenant billing.

    System Designsystem-designdistributed-systemsschedulingmulti-tenancy
  • SQL & DataMediumAuto-graded
    Top 5 Delivery Routes by Fuel Efficiency

    Tests aggregating trip data across two tables, guarding against division by zero, and ranking results with a deterministic tie-break.

    SQL & Dataaggregationfilteringsorting
  • BehavioralMediumModel answer
    Adapting to Shifting Goals and Leading Through Ambiguity

    Demonstrate how you navigate changing requirements, resolve stakeholder conflicts, prioritize competing demands, and build feedback loops when none exist.

    Behavioralleadershipadaptabilitystakeholder-managementdecision-making
  • System DesignMediumModel answer
    Partition Assignment and Rebalancing in Distributed Consumers

    Explain how a distributed message queue assigns partitions to consumers, handles ordering, and recovers from failures through rebalancing.

    System Designdistributed-systemsmessagingscalabilityfault-tolerance
  • Machine LearningMediumModel answer
    Build a Recommendation Engine for Content Discovery

    Design an ML system that delivers personalized content feeds combining user interests with global trends while maintaining low latency and diversity.

    Machine Learningrecommendation-systemsml-system-designpersonalizationretrieval
  • Machine LearningHardModel answer
    Ensemble Methods and the Bias-Variance Tradeoff

    Explain how bagging, boosting, and random forests reduce prediction error through their effects on bias and variance.

    Machine Learningensemble-learningbias-variancerandom-forestboosting
  • SQL & DataMediumModel answer
    Calculate Contributor Type Distribution from Activity Logs

    Clean and aggregate edit logs to compute daily percentages of documents edited by owners versus anonymous users.

    SQL & Datadata-cleaningaggregationjoinspandas
  • Machine LearningHardModel answer
    Build a RAG-powered enterprise document search platform

    Design the end-to-end architecture for a production retrieval-augmented generation system serving internal knowledge search at scale.

    Machine Learningragsearchml-systemsarchitecture
  • System DesignHardModel answer
    Design a Medication Approval Tracking Platform with Worklists and Digests

    Design backend services for managing async insurance approval workflows, including real-time status tracking, a concurrent pharmacist task queue, and scheduled digest emails.

    System Designevent-drivenasync-workflowsdistributed-systems
  • Machine LearningMediumModel answer
    Evaluating Equity Risk Models for Portfolio Applications

    Design a framework to select between two equity risk models by testing forecast accuracy, structural validity, and practical usability in live portfolio decisions.

    Machine Learningrisk-modelingmodel-evaluationportfolio-management