KatInterview

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

Interview Practice Problems

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

6138
Problems
2277
Auto-graded
15
Topics
275
Added today

Showing 2971–3000 of 6138 results

  • BehavioralMediumModel answer
    Ranking Positive Work-Style Statements in a Forced-Choice Test

    Explain how to handle forced-choice work-style items where all three statements are positive, and what consistent engineering profile your Most/Least picks should convey.

    Behavioralbehavioralforced-choicework-styleself-awareness
  • Data Structure DesignHardModel answer
    Eagerly Cached Cell Grid with Dependency Tracking

    Build a grid of cells that stores integers or sum formulas, keeps every value precomputed for constant-time reads, and refuses any write that would introduce a circular reference.

    Data Structure Designgraphtopological-sortcycle-detectioncaching
  • Data Structure DesignEasyModel answer
    Layered Scopes for a Key-Value Store with Savepoints

    Build an in-memory key-value store whose writes can be grouped into nested, revertable scopes that either merge into the enclosing scope or are thrown away.

    Data Structure Designstackhash-mapdesignscoping
  • Trees & GraphsMediumAuto-graded
    Best Island Total with Row-Major Boundary Cells

    Find connected components in a signed grid and pick the best-scoring one, with and without a no-negatives rule, reporting its first and last row-major cells.

    Trees & Graphsgriddfsconnected-componentstie-breaking
  • Machine LearningHardModel answer
    Credit Default Risk Model: Design, Cutoff, and Fairness Review

    Design an end-to-end default-risk classifier for a lender, from label definition through approval cutoff, fairness testing, explainability and post-launch monitoring.

    Machine Learningcredit-riskclassificationfairnesscalibration
  • System DesignMediumModel answer
    Building a Citation-Accurate Document Q&A Service over PDFs

    Design a service that ingests text, scanned and table-heavy PDFs, answers questions with page-level citations, and keeps its index correct as documents are replaced or removed.

    System Designragdocument-parsingvector-searchcitations
  • Data Structure DesignMediumModel answer
    Run Work Items on Manual Python Threads and Debug Them in Linux

    Fan a function out over a list using a fixed number of hand-made Python threads, capture every result or error, join cleanly, then inspect the live threads from the Linux shell.

    Data Structure Designpythonthreadingconcurrencylinux
  • BehavioralEasyModel answer
    Writing an Effective Prompt to Get Help Debugging Code

    Decide which way of asking an AI assistant for debugging help gets the most reliable diagnosis, and justify the choice with trade-offs, edge cases and a worked example.

    Behavioralprompt-engineeringai-assisted-debuggingbug-reportsdeveloper-workflow
  • Data Structure DesignMediumAuto-graded
    Live Ranking Board for Sponsored Listings

    Process a batch of insert, delete and top-k operations on scored items, keeping a live ranking with in-place score updates and deterministic tie-breaking.

    Data Structure Designheaphash-maplazy-deletiondesign
  • Data Structure DesignEasyAuto-graded
    Ledger Replay: Deposits, Withdrawals and Percentage Rewards

    Simulate a single account balance across a sequence of operations, silently rejecting invalid ones, and report the balance after each step.

    Data Structure Designsimulationstate-managementvalidationfloating-point
  • SQL & DataMediumModel answer
    Why Does This Hive INSERT...SELECT Fail or Load Bad Data?

    Diagnose a failing Hive INSERT...SELECT into a partitioned ACID ORC table and explain, in order, the fixes for syntax, alignment, casts, partitions, settings and format.

    SQL & Datahiveinsert-selectdynamic-partitionstype-casting
  • Trees & GraphsMediumAuto-graded
    Costliest Root Task in a Task Forest

    Sum durations over each root's subtree in a parent-linked record list and return the root with the largest total, testing tree aggregation and iterative traversal.

    Trees & Graphstreedfshash-mapiterative-traversal
  • SQL & DataMediumAuto-graded
    Top Two Spending Categories per Shopper with Share of Spend

    Aggregate line-item spend by shopper and category, rank with ties, keep the top two ranks, add spend share, and handle shoppers with no purchases.

    SQL & Dataaggregationgroupingrankingjoins
  • System DesignHardModel answer
    Designing a Flash-Sale Ticketing Platform Without Overselling

    Design a worldwide ticketing service that survives on-sale stampedes, gives fast seat-map reads, and guarantees every seat is sold to at most one buyer.

    System Designsystem-designconcurrencydistributed-systemscaching
  • BehavioralMediumModel answer
    Career Pitch: Why You're Moving and What You Led

    Deliver a structured recruiter-screen pitch covering your background, reason for moving, interest in a fintech engineering team, and one project where you led technically with measurable results.

    Behavioralbehavioralrecruiter-screenleadershipstorytelling
  • Dynamic ProgrammingMediumAuto-graded
    Longest Shared Block After Removing One Character

    Find the longest block shared with a second string after optionally deleting one character from the first, using an O(n*m) DP with a deletion-used state.

    Dynamic Programmingdynamic-programmingstringslongest-common-substring
  • BehavioralMediumModel answer
    Shipping a Data Science Deliverable When the Launch Date Jumps Forward

    Describe a time you delivered a data science solution after a sudden deadline cut, covering how you chose scope, brought stakeholders along, and contained risk.

    Behavioralbehavioralstar-methodprioritizationstakeholder-management
  • Data Structure DesignMediumAuto-graded
    Nested Message Schema: Size and Field Type Queries

    Parse a mini protobuf-style schema from text, then answer batched size and field-type queries with nested messages, forward references, and cycle and error handling.

    Data Structure Designparsinghash-maprecursionmemoization
  • Trees & GraphsMediumAuto-graded
    Best Conversion Product Over Simple Currency Paths

    Find the largest product of edge weights over simple directed paths between two nodes, using backtracking DFS, with a special case for identical endpoints and an unreachable case.

    Trees & Graphsgraphdfsbacktrackingsimple-paths
  • SQL & DataMediumModel answer
    Best Video Category by Mean Watch Time in pandas

    Compute which category has the highest mean watch time across valid video rows, with null and nonpositive filtering, name lookup, lexicographic tie-breaks, and rounding.

    SQL & Datapandasaggregationhash-mapdata-cleaning
  • SQL & DataMediumModel answer
    Staggered-Rollout Panel and Weekly Rollup in SQL

    Write warehouse SQL that turns daily participation logs into a treatment-aware employee-day panel and a site-week participation table for a staggered-rollout DiD analysis.

    SQL & Datasqldifference-in-differencespanel-dataleft-join
  • StringsMediumAuto-graded
    Find a Block Repeated Back-to-Back in a Token List

    Decide whether a list of tokens contains a block of a given length repeated a given number of times in a row, testing period detection with a linear scan.

    Stringsstringsarrayssliding-windowperiodicity
  • SQL & DataMediumModel answer
    How a Three-Column MySQL Index Serves Different Queries

    Analyze how one composite InnoDB index handles three query shapes, covering leftmost-prefix seeks, ordering, range limits, index condition pushdown, and the cost of row lookups.

    SQL & Datamysqlinnodbcomposite-indexcovering-index
  • System DesignHardModel answer
    Planning a Sparse-Expert LLM Training Run on 256 GPUs

    Plan an end-to-end training setup for a bilingual sparse-expert language model on about 1T tokens and 256 A100-80GB GPUs, including a path to 1,024 GPUs.

    System Designmixture-of-expertsdistributed-trainingexpert-parallelismllm-pretraining
  • Trees & GraphsMediumAuto-graded
    Net Access Letters Across a Dependency Hierarchy

    Compute each node's final letter set in a DAG where grants flow to all descendants but revocations apply only to the node that declares them.

    Trees & Graphsgraphdagtopological-sortbitmask
  • Math & Bit ManipulationMediumModel answer
    Bit-Level Speedups for a Hot Integer Loop

    Choose bit-twiddling techniques that cut branch mispredictions and memory traffic in a tight integer loop, justify their correctness, and reason about their CPU and cache effects.

    Math & Bit Manipulationbit-manipulationbranchlesspopcountperformance
  • System DesignHardModel answer
    Build a Charge-Once Card Payment Service Behind a Gateway

    Design an internal payment service that charges a card at most once per order despite retries, timeouts and crashes, and reconciles its records with an external payment provider.

    System Designidempotencydistributed-systemspaymentsreconciliation
  • System DesignMediumModel answer
    Design a Governed Catalog and Access Layer for Vendor Price Data

    Design a metadata-driven service that lets quants and PMs find, trust and query licensed vendor market data, with lineage, entitlements, freshness alerts and point-in-time reads.

    System Designsystem-designdata-catalogbitemporalentitlements
  • Data Structure DesignEasyAuto-graded
    Sorted Buffer Simulator with Insert and Snapshot Commands

    Simulate a container that keeps integers in ascending order under insert and snapshot commands, testing binary-search insertion, duplicate handling, and copying versus aliasing.

    Data Structure Designbinary-searchsimulationsorted-listdesign
  • BehavioralMediumModel answer
    Behavioral Stories for a Product Analytics Data Scientist Role

    Prepare four behavioral stories for a product analytics data scientist: a high-impact project, a disagreement, working with a new stakeholder, and onboarding a teammate.

    Behavioralbehavioralleadershipstakeholder-managementconflict-resolution