KatInterview

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

Interview Practice Problems

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

5988
Problems
2219
Auto-graded
15
Topics
271
Added today

Showing 5581–5610 of 5988 results

  • SQL & DataMediumModel answer
    Extract User Metrics and Daily Summaries from Order Data

    Perform three pandas aggregations: identify each user's highest-value order, calculate mean order value, and generate per-day order statistics.

    SQL & Datapandasaggregationgroupbydata-analysis
  • System DesignMediumModel answer
    Content-Addressed Photo Service with Cross-User Deduplication

    Design a service where users upload, view, and remove photos, storing each unique content blob once using its hash as the key.

    System Designstoragededuplicationdistributed-systemsapi-design
  • Data Structure DesignMediumModel answer
    Contiguous Range Manager with Dynamic Resizing

    Build a system to manage named, non-overlapping contiguous ranges over a fixed ID space with dynamic resizing that minimally shifts neighbors.

    Data Structure Designrange-managementgreedyarraysystem-design
  • Data Structure DesignMediumModel answer
    Transaction Policy Engine Design and Implementation

    Build a configurable rule engine that evaluates financial transactions against spending policies and returns approval decisions in real-time.

    Data Structure Designrule-enginepolicy-evaluationsystem-designdata-structures
  • StringsEasyAuto-graded
    Generate Number Sequence with Divisibility Rules

    Tests basic control flow, modular arithmetic, and string formatting by transforming numbers according to divisibility conditions.

    Stringsconditionalsmoduloiteration
  • Arrays & HashingHardAuto-graded
    Plurality and Instant-Runoff Vote Counting

    Tests aggregated vote counting, majority detection, and iterative candidate elimination in ranked-choice systems.

    Arrays & Hashingsimulationhash-mapvoting-algorithms
  • System DesignMediumModel answer
    Building and Testing a REST API Endpoint in Python

    Design a REST endpoint for a Python function and write unit tests that validate logic, handle edge cases, and isolate dependencies.

    System DesignREST APItestingPythonweb frameworks
  • Arrays & HashingMediumAuto-graded
    Rearrange Array to Next Greater Sequence

    Tests in-place array manipulation to transform a sequence into its immediate lexicographic successor, wrapping to the smallest arrangement when needed.

    Arrays & Hashingarrayspermutationsin-placetwo-pointers
  • Data Structure DesignMediumModel answer
    Frame-Based Media Player in JavaScript

    Build a JavaScript controller for frame-by-frame playback with play, pause, seek, and configurable FPS, handling timer accuracy and state management.

    Data Structure Designjavascripttimersclosuresapi-design
  • Dynamic ProgrammingMediumAuto-graded
    String Reversal with Contiguous Subarray Extremes

    Tests string manipulation and dynamic programming through reversing text and finding optimal contiguous subarrays by sum and product.

    Dynamic Programmingarraysstringskadanesubarray
  • Statistics & ExperimentsMediumModel answer
    Subscription Profitability and Policy Pricing Analysis

    Calculate customer lifetime value across different contract terms, model churn impact, determine break-even thresholds, and analyze insurance claim rates with statistical intervals.

    Statistics & Experimentsunit-economicsexpected-valuebreak-evenconfidence-intervals
  • StringsMediumAuto-graded
    Distribute and Expand Algebraic Products

    Tests recursive parsing, the distributive property of multiplication over addition, and constructing expanded expressions from nested operations.

    Stringsparsingrecursionstring-manipulation
  • Machine LearningHardModel answer
    Variational Autoencoders: Theory and Training Dynamics

    Derive the ELBO objective for VAEs, explain gradient estimation through reparameterization, compute the KL term analytically, and diagnose posterior collapse.

    Machine Learninggenerative-modelsvariational-inferencedeep-learning
  • Data Structure DesignMediumModel answer
    Text Editor with Undo and Word Suggestions

    Build a text editor class supporting character insertion, deletion, cursor movement, undo/redo operations, and prefix-based word autocompletion.

    Data Structure Designdata-structurestrieundo-redogap-buffer
  • BehavioralMediumModel answer
    Investigating and Resolving a Deep Technical Issue

    Explain how you diagnosed and fixed a complex system problem using instrumentation, hypothesis testing, and validation.

    Behavioraldebuggingproblem-solvingownershiptechnical-depth
  • Math & Bit ManipulationMediumAuto-graded
    Maximum Theater Group Seating Capacity

    Tests bitmask-based interval availability checking for constrained seat allocation with large input optimization.

    Math & Bit Manipulationbitmaskgreedyoptimization
  • System DesignMediumModel answer
    Multi-Region File Distribution with Tenant Isolation

    Design a scalable pipeline that replicates large immutable files from a central location to multiple per-tenant destinations with guaranteed delivery and strict isolation.

    System Designdistributed-systemsmulti-tenancydata-replicationfault-tolerance
  • Trees & GraphsMediumAuto-graded
    Subtree Sum Replacement in Level-Order Arrays

    Tests post-order traversal, heap indexing in complete binary trees, and efficient bottom-up aggregation without recursion.

    Trees & Graphsbinary-treespost-order-traversalcomplete-binary-treeaggregation
  • BehavioralMediumModel answer
    Speed, Risk, and Delivery: Two Stories of Acting Under Pressure

    Describe a time you made a fast decision with incomplete information, and a separate time you shipped an important project against a fixed deadline.

    Behavioralleadershipdecision-makingproject-management
  • Machine LearningMediumModel answer
    Building a Ranking System for E-Commerce Search

    Design an ML system that orders products by relevance for marketplace search, covering objective definition, training data, features, model architecture, and evaluation.

    Machine Learningrankinge-commercemulti-task-learningposition-bias
  • Data Structure DesignHardAuto-graded
    Streaming Median Query

    Tests balanced heap design to maintain dynamic order statistics with logarithmic insertions and constant-time median queries.

    Data Structure Designheapsdata-structuresstreamingmedian
  • Arrays & HashingHardAuto-graded
    Random Transfer Between Two Queues: Drain Time and Odds

    Tests ability to model a lazy symmetric random walk as a Markov chain, derive a closed-form hitting-time formula, and compute absorption probabilities analytically.

    Arrays & Hashingmarkov-chainsrandom-walkprobability
  • Machine LearningMediumModel answer
    Designing a Revenue-Maximizing Donor Outreach Strategy

    Build a model to optimize fundraising campaigns by predicting donation likelihood and amounts, then create profit-driven policies for different outreach channels.

    Machine Learningpredictive-modelinguplift-modelingcalibrationcausal-inference
  • Trees & GraphsHardAuto-graded
    Earliest Moment a Social Network Becomes Fully Connected

    Tests offline dynamic graph connectivity using a segment-tree-over-time with a rollback-capable union-find to handle both edge insertions and deletions.

    Trees & Graphsunion-findsegment-treedynamic-connectivity
  • System DesignMediumModel answer
    Orchestrating a Durable Multi-Step Refund Process

    Design and implement a crash-resistant orchestrator that coordinates a refund across three HTTP services with idempotency, persistence, and retry logic.

    System Designdistributed-systemsidempotencystate-machinehttp
  • Heaps, Sorting & SearchEasyAuto-graded
    Minimum Largest Piece After K Cuts on a Log

    Tests binary search on the answer to find the minimum possible largest piece when splitting a log into at least K+1 pieces.

    Heaps, Sorting & Searchbinary searchgreedysorting
  • Dynamic ProgrammingMediumAuto-graded
    Pack Exactly K Items with Maximum Total Value

    Tests the candidate's ability to apply a 2D knapsack variant requiring exactly a fixed item count while maximizing value, combining count and capacity constraints via DP.

    Dynamic Programmingdynamic programmingknapsack2d dp
  • Heaps, Sorting & SearchMediumAuto-graded
    Count Active Users in Trailing Time Window

    Tests binary search on sorted lists to efficiently count distinct entities with at least one event in a sliding time range.

    Heaps, Sorting & Searchbinary-searchtime-seriessliding-window
  • Arrays & HashingMediumAuto-graded
    Balance and Settle Shared Costs

    Tests the ability to calculate net balances from shared expense records and generate transfers that zero out all debts.

    Arrays & Hashinghash-mapgreedysimulation
  • Data Structure DesignMediumModel answer
    Parallel Job Scheduler with Dependency Management

    Build a concurrent task executor that honors dependencies, enforces worker limits, and propagates failures through dependent jobs.

    Data Structure Designconcurrencygraphstopological-sort