KatInterview

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

Interview Practice Problems

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

6067
Problems
2249
Auto-graded
15
Topics
276
Added today

Showing 1681–1710 of 6067 results

  • 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
  • Dynamic ProgrammingMediumAuto-graded
    Pair Workers With Distinct Stations at Minimum Grid Distance

    Match each point in one list to a different point in a larger list so the total Manhattan distance is minimal, which suits a bitmask DP given the small limits.

    Dynamic Programmingbitmask-dpassignment-problemmanhattan-distance
  • Trees & GraphsMediumModel answer
    Feature Flag Rollout Validator with Dependency Cycle Detection

    Parse feature dependency specs, run modular checksum verification, and evaluate user eligibility and feature graph dependencies while handling cyclic rollouts.

    Trees & Graphstrees-graphsstringsdepth-first-search
  • Machine LearningMediumModel answer
    Building a Grounded Document Q&A System with Retrieval

    Design a question-answering system that retrieves evidence from a versioned, access-controlled document set, cites sources, abstains when unsupported, and measures retrieval and answer quality separately.

    Machine Learningragretrievalevaluationchunking
  • Data Structure DesignMediumModel answer
    Build a Biased Index Picker Using Cumulative Totals

    Design a class that returns an index at random with probability proportional to its weight, then explain how to make each draw fast and how to handle updates.

    Data Structure Designprefix-sumbinary-searchrandom-samplingfenwick-tree
  • BehavioralMediumModel answer
    Behavioral Interview: Ownership, Constructive Feedback, and Cross-Domain Impact

    Craft compelling STAR-format responses for three core engineering leadership prompts: owning a project end-to-end, integrating critical feedback, and identifying issues outside your domain.

    Behavioralbehavioralleadershipownershipcollaboration
  • BehavioralEasyModel answer
    Data Engineer Screen: Schemas, Integrity, Pipeline Failures

    Answer five data-engineering screening prompts: intro, grad-school skills, source-to-target schema mismatches, end-to-end data integrity, and a STAR story about a pipeline failure.

    Behavioraletldata-engineeringschema-evolutiondata-quality
  • Machine LearningHardModel answer
    Design a Production RAG Engine with Citations and Strict Access Control

    Design, optimize, and systematically evaluate an enterprise RAG system that processes heterogeneous documents, handles ACLs, and guarantees zero stale citations under high query throughput.

    Machine LearningRAGSystem DesignVector SearchLLM Evaluation
  • Statistics & ExperimentsHardModel answer
    Vetting Co-Brand Card Deals with a Travel Marketplace and a Warehouse Club

    Decide whether a card issuer should sign co-brand deals with a home-rental marketplace and a warehouse retailer: define value, rank drivers, design a test, and set go/no-go rules.

    Statistics & Experimentsexperiment-designcustomer-lifetime-valueunit-economicsadverse-selection
  • StringsMediumModel answer
    Java Code Review: Refactoring a CSV Generator

    Analyze a poorly designed Java method for generating CSV strings and detail performance, RFC 4180 compliance, memory usage, and security enhancements.

    Stringscode-reviewjavastringscsv
  • Arrays & HashingMediumAuto-graded
    Count Maximum Disjoint Pairs Summing to a Target

    Find the most index-disjoint pairs in an integer array whose values add up to a target, testing hashing of complements, counting, and handling of the self-pairing case.

    Arrays & Hashinghash-mapcountingtwo-pointersgreedy
  • Trees & GraphsHardModel answer
    Topological Task Scheduler and Strict Expression Parser

    Solve a task dependency ordering problem via topological sort and build an expression evaluator supporting custom operator precedence, unary signs, and overflow checks.

    Trees & Graphstopological-sortgraph-algorithmsexpression-parserstacks
  • Stacks & QueuesEasyAuto-graded
    Cancel Neighboring Letter Pairs in a String

    Tests using a stack to repeatedly cancel adjacent equal characters in a string, including cascading cancellations, in linear time.

    Stacks & Queuesstackstringsimulation
  • System DesignMediumModel answer
    Build a Social App for Sharing Pictures and Short Clips

    Design a social platform where people post photos and short videos, follow each other, and browse a personalized home feed, with attention to media delivery, feed fan-out and trade-offs.

    System Designsystem-designfeed-generationcdnfan-out
  • Data Structure DesignMediumModel answer
    Trailing-Day Campaign CTR over Two Skewed Event Feeds

    Build a generator that emits per-campaign impression, click and CTR figures over a trailing 24-hour window, counting one click per impression and accepting events up to 10 minutes late.

    Data Structure Designstreamingsliding-windowheaphash-map
  • Stacks & QueuesMediumAuto-graded
    Per-Function Self Time from a Call Trace

    Sweep a single-threaded call trace with a stack to total each function's self time under half-open intervals, with recursion, strict validation, and name-sorted output.

    Stacks & Queuesstacksimulationhash-mapvalidation
  • System DesignMediumModel answer
    Design an Automated Order Exception & Dispute Resolution Service

    Design and implement a microservice that handles customer order disputes, applies explicit refund business rules, and prevents duplicate processing.

    System DesignAPI DesignData ModelingBusiness LogicState Management
  • StringsEasyAuto-graded
    Earliest Non-Repeating Symbol Position

    Locate the index of the earliest symbol in an alphanumeric string that occurs only once, using frequency counting and an ordered scan, or return -1.

    Stringshash-mapcountingstringtwo-pass
  • BehavioralMediumModel answer
    Demonstrating Depth of Analysis and Focus Under Uncertainty

    Share a complex issue that demanded rigorous investigation, explaining how you prioritized key factors, validated your focus, and delivered a measurable outcome.

    Behavioralbehavioralproblem-solvinganalyticstechnical-leadership
  • Heaps, Sorting & SearchMediumAuto-graded
    Simulate Multi-Timer Expiry with Single System Timer

    Simulate the execution and triggering order of multiple scheduled timers using a min-heap under system clock advancements.

    Heaps, Sorting & Searchheappriority-queuedesignsimulation
  • Data Structure DesignMediumModel answer
    Proportional Random Index Picker with Fast Repeated Queries

    Design a class that returns a random index with probability proportional to its weight, optimized for many repeated draws after one-time setup.

    Data Structure Designprefix-sumsbinary-searchrandom-samplingfenwick-tree
  • System DesignHardModel answer
    Architecting a Real-Time Exchange Web Client

    Plan the browser-side architecture of a live crypto-style exchange screen, covering rendering, state, streaming data, order safety, security, and observability.

    System Designfrontend-architecturewebsocketstate-managementreact
  • System DesignHardModel answer
    Build a Scalable Storefront for Selling Books Online

    Design a book-selling web platform covering catalog search, cart, checkout and orders, with emphasis on inventory correctness, idempotent payments, caching, and fault tolerance.

    System Designsystem-designe-commerceinventoryidempotency
  • Trees & GraphsMediumAuto-graded
    Determine Build Task Schedule

    Find a valid topological sequence for tasks with prerequisite constraints or detect cyclic dependencies.

    Trees & Graphsgraphtopological-sortbfsdfs
  • BehavioralMediumModel answer
    Using Generative AI Tools Safely and Effectively in Engineering

    Demonstrate how to adopt LLM tools into software workflows with appropriate human oversight, data privacy guardrails, rigorous verification, and clear performance metrics.

    Behavioralbehavioralgenerative-aideveloper-velocitycode-quality
  • StringsEasyAuto-graded
    Run Strings Through a Two-Letter State Machine

    Simulate a partial deterministic automaton over the letters a and b, handling missing transitions, invalid symbols and empty input, and report acceptance for a batch of query strings.

    Stringssimulationhash-mapstate-machinestrings
  • Dynamic ProgrammingMediumAuto-graded
    Smallest Fully Bracketed Arithmetic Expression Hitting a Target

    Enumerate all operator and bracket choices over an ordered list of numbers and return the ASCII-smallest canonical expression that evaluates to the target, or an empty string.

    Dynamic Programmingrecursioninterval-dpexpression-treesmemoization
  • Statistics & ExperimentsMediumModel answer
    Investigating a Sudden Fall in Courier Offer Acceptance

    Diagnose a nationwide drop in courier offer acceptance: audit the data, split mix from rate effects, assess marketplace fallout, and design a spillover-safe experiment.

    Statistics & Experimentsroot-cause-analysismetric-decompositionswitchback-experimentmarketplace
  • Data Structure DesignMediumAuto-graded
    Design an In-Memory Reservation Manager

    Implement an in-memory venue reservation system supporting quick seat allocation, cancellation tracking, and capacity queries.

    Data Structure Designhash-tabledesignstacksdata-structures
  • Math & Bit ManipulationEasyAuto-graded
    Five Quick Quantitative Puzzles with Exact String Answers

    Solve five short arithmetic and algebra puzzles (units, compounding percentages, linear system, rate, series scaling) and return them in an exact string format.

    Math & Bit Manipulationmatharithmeticalgebraunit-conversion