KatInterview

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

Interview Practice Problems

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

6100
Problems
2258
Auto-graded
15
Topics
272
Added today

Showing 3661–3690 of 6100 results

  • System DesignHardModel answer
    Byte-Level File Equality and Fleet-Wide Deduplication

    Design a hash-based pipeline to decide if two files hold identical bytes, then scale it to deduplicating content across many machines.

    System Designhashingdeduplicationsystem-designfile-io
  • Data Structure DesignMediumAuto-graded
    Versioned Key-Value Store with Global Version Tracking

    Implement a key-value store where each write increments a global version counter and reads retrieve values by version using binary search.

    Data Structure Designbinary-searchdata-structuresversioning
  • Trees & GraphsMediumAuto-graded
    Equal Binary Digits and Ascending Tree Chain

    Tests prefix-sum balancing for binary arrays and depth-first search for strictly increasing root-to-leaf paths in binary trees.

    Trees & Graphstreesarraysprefix-sumdfs
  • Math & Bit ManipulationMediumAuto-graded
    Two-Year Show Profit: Renewal vs. New Launch

    Compute two-year profits for two show options, blend the new show's outcomes by success probability, and find the break-even probability.

    Math & Bit Manipulationarithmeticexpected-valuebreak-evenbusiness-math
  • Data Structure DesignMediumModel answer
    Dynamic Hierarchy Manager with Timestamp Ordering

    Build a system that processes timestamped parent-child updates arriving in any order, maintains a valid tree structure, and prevents cycles.

    Data Structure Designtreesgraphsstate-managementcycle-detection
  • StringsHardAuto-graded
    Encode Consecutive Character Runs as Digit Sequences

    Tests run-length encoding with multi-digit counts split into individual characters, requiring careful pointer management and constant-space thinking.

    Stringstwo-pointersrun-length-encodingin-place
  • Machine LearningMediumModel answer
    Build an Agent Pipeline to Revise Contracts Against Rule Sets

    Design a system that uses LLMs to automatically rewrite a contract so it satisfies dozens of compliance rules, handling overlaps, conflicts, verification, and cost.

    Machine Learningllm-agentsmulti-step-reasoningedit-trackingverification
  • BehavioralEasyModel answer
    Preparing Structured Answers for Leadership Behavioral Interviews

    Develop clear, evidence-based responses to common leadership and technical-judgment questions using the STAR framework with quantified outcomes.

    Behavioralbehavioralleadershipcommunicationproblem-solving
  • Arrays & HashingMediumAuto-graded
    Grid Walker with Blocked Cells

    Tests simulation with hash-based obstacle lookup, movement logic, and tracking a running maximum over coordinate positions.

    Arrays & Hashingsimulationhash-setgrid
  • Heaps, Sorting & SearchMediumAuto-graded
    Merge Sorted Event Streams with Running Sum

    Tests k-way merging of pre-sorted sequences using a min-heap, deterministic tie-breaking by source index, and accumulating a running total across all events.

    Heaps, Sorting & Searchheapmergek-way-mergerunning-sum
  • Statistics & ExperimentsMediumModel answer
    Simpson's Paradox, Segregation Metrics, and Fixing Ad Regression

    Explain a classic statistical trap, design spatial metrics for species data, diagnose a causal inference problem, and reduce survey error — all in plain language.

    Statistics & Experimentssimpson's paradoxconfoundingexperimental designmargin of error
  • System DesignMediumModel answer
    Build a Thread-Safe Connection Pool with Lazy Setup

    Design a lazily initialized, concurrency-safe connection pool with a wrapper class that returns connections on close, handles exhaustion via timeout, and supports clean shutdown.

    System Designconcurrencyconnection-poolthread-safetypython
  • BehavioralMediumModel answer
    Telling an Innovation Story with Baseline Metrics

    Frame a self-initiated improvement as a STAR story with quantified pain, a genuinely novel mechanism, stakeholder guardrails, before/after metrics, and an applied lesson.

    Behavioralbehavioralinnovationimpact-metricsstakeholder-influence
  • Dynamic ProgrammingMediumAuto-graded
    Score Bust Probability: Stop When You Hit the Target

    Tests whether a candidate can build an O(n) sliding-window DP to compute the probability that a random accumulation process stops within a given score ceiling.

    Dynamic Programmingdynamic-programmingsliding-windowprobability
  • System DesignMediumModel answer
    Multi-Cloud GPU Scheduler for Machine Learning Workloads

    Build a resource manager that schedules ML training jobs across on-premises and public cloud GPU clusters with fairness, cost optimization, and reliability.

    System Designdistributed-systemsresource-managementschedulingcloud-infrastructure
  • Trees & GraphsMediumModel answer
    Content-Based Duplicate File Detector

    Recursively scan a directory tree, group files by size then content hash, and return every set of two or more paths that hold identical bytes.

    Trees & Graphshashingfile-systemtraversaldeduplication
  • BehavioralEasyModel answer
    Managing a Multi-Party Technical Disagreement

    Walk through a workplace conflict involving peers, leadership, or cross-functional partners, and explain how you drove resolution while preserving relationships.

    Behavioralconflict-resolutionstakeholder-managementleadershipcommunication
  • Statistics & ExperimentsMediumModel answer
    Estimating Feature Impact Without a Holdout Group

    Design a retrospective analysis to measure the causal effect of a payment optimization deployed to all merchants in one region, with no randomized control.

    Statistics & Experimentscausal-inferenceexperimentationobservational-methods
  • Statistics & ExperimentsMediumModel answer
    Bootstrap Confidence Interval for Mean Order Value

    Implement vectorized bootstrap resampling to estimate a 95% confidence interval for the mean of a sample, handling memory constraints efficiently.

    Statistics & Experimentsbootstrapconfidence-intervalsresamplingnumpy
  • StringsMediumAuto-graded
    Multiply Large Numbers as Strings

    Tests implementation of grade-school multiplication on arbitrarily large integers represented as strings without using built-in big integer operations.

    Stringsmathsimulationarray-manipulation
  • Data Structure DesignMediumModel answer
    Design a Five-Card Hand Evaluator with Partial Hand Completion

    Model poker-style five-card hands with an abstract type hierarchy, compare two hands by strength and tie-break, then find the strongest and weakest completions of a partial hand.

    Data Structure Designobject-oriented designclassificationcombinatoricscomplexity analysis
  • System DesignMediumModel answer
    Transaction State Management with External Payment Processors

    Build a service that orchestrates payment transitions through hold, capture, and settlement while handling unreliable gateway responses and ensuring financial correctness.

    System Designdistributed-systemsidempotencystate-machinesfinancial-systems
  • Arrays & HashingMediumAuto-graded
    Single Buy-Sell Transaction for Maximum Gain

    Tests optimal single-pass tracking of minimum buy price to maximize profit from one stock transaction.

    Arrays & Hashingarraysgreedyoptimizationsingle-pass
  • BehavioralMediumModel answer
    Using AI Coding Assistants Responsibly in a Technical Interview

    Describe a concrete, repeatable workflow for leveraging AI coding tools during a live interview while maintaining code quality, security, and full ownership of your work.

    BehavioralAI toolscode reviewsecuritytime management
  • System DesignMediumModel answer
    Build a Token-Auth Fetch-and-Upsert CLI Pipeline

    Design a layered CLI tool that calls a bearer-token API, validates JSON into records, and idempotently upserts them into a relational table.

    System Designhttp-clientidempotencyupserterror-handling
  • Machine LearningHardModel answer
    Design a RAG-Powered Knowledge Assistant with Access Control

    Architect a retrieval-augmented generation system that answers natural language queries over heterogeneous internal documents with strict permissions, low latency, and near-real-time freshness.

    Machine LearningRAGLLMsystem-designinformation-retrieval
  • Arrays & HashingMediumAuto-graded
    Build Sorted Email Event Timeline for Subscriptions

    Tests date arithmetic, multi-level sort stability, and designing a rule system that cleanly handles event ordering and extensibility.

    Arrays & Hashingsortingdatessimulation
  • System DesignHardModel answer
    Five-Year Threat Map for a Search-Ads Giant

    Rank the three biggest five-year threats to a dominant search-and-ads company, pick two tech trends worth tracking, and go deep on one.

    System Designproduct-strategyprioritizationai-agentsmonetization
  • Data Structure DesignMediumModel answer
    Concurrent Task Execution with Type-Level Exclusion

    Build a synchronization mechanism allowing tasks of the same type to run together while blocking tasks of different types from overlapping.

    Data Structure Designconcurrencythreadingsynchronization
  • Data Structure DesignMediumAuto-graded
    Simulate a Linked List with Iterator and Transform

    Tests ability to implement a doubly-linked list supporting sequential iteration and non-mutating element-wise transformation via a command-driven simulation.

    Data Structure Designlinked-listiterator-patternhigher-order-functions