KatInterview

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

Interview Practice Problems

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

6058
Problems
2243
Auto-graded
15
Topics
272
Added today

Showing 1531–1560 of 6058 results

  • SQL & DataMediumModel answer
    Gap Between a User's Two Latest Views of the Same Ad

    Write one SQL query returning, per user and ad with at least two views, the newest and second-newest timestamps plus the gap between them in seconds.

    SQL & Datasqlwindow-functionsrow-numbertimestamp-arithmetic
  • BehavioralEasyModel answer
    Demonstrating Accountability and Handling Product Out-of-Stock Scenarios

    Learn how to present technical mistakes responsibly using structured frameworks and design resilient workflows for out-of-stock items in multi-party marketplaces.

    BehavioralBehavioralSystem DesignMarketplace OperationsIncident Management
  • Arrays & HashingMediumAuto-graded
    Quarter-Turn a Square Grid of Pixels Without Extra Storage

    Turn a square integer grid a quarter turn clockwise by modifying it in place, testing index mapping and in-place transforms such as transpose plus row reversal.

    Arrays & Hashingmatrixin-placesimulationtranspose
  • Statistics & ExperimentsMediumModel answer
    Partnership Profit Equations and Break-Even: Restaurant and Card Cases

    Build profit equations, derive break-even volumes and the cost mix that holds profit flat, then stress-test a recommendation for a restaurant deal and a credit/debit product.

    Statistics & Experimentsunit-economicsbreak-evencontribution-marginsensitivity-analysis
  • Machine LearningMediumModel answer
    Building a Training Set for an OCR Error-Correction Model

    Design a scalable pipeline that scores noisy OCR pages, distills a small verified gold set from a stronger LLM, and filters out pages too degraded to repair.

    Machine Learningllm-fine-tuningdata-pipelinesynthetic-dataocr
  • Machine LearningMediumModel answer
    Conditions for Boundedness in Unconstrained Quadratic Minimization

    Analyze when an unconstrained scalar quadratic function has a finite minimum, and derive the optimal solution set and value using matrix properties.

    Machine Learningoptimizationconvexitylinear-algebraquadratic-form
  • BehavioralMediumModel answer
    Leading Platform-Wide Architectural Shifts and AI Integration

    Demonstrate Staff-level leadership by articulating how you drive cross-team platform migrations, resolve technical resistance, safely incorporate AI tooling, and deliver lasting impact.

    Behavioralleadershiparchitectureai-adoptioncross-team-collaboration
  • Math & Bit ManipulationEasyAuto-graded
    Yearly Earnings Report for a Rewards Membership Program

    Compute yearly revenue, cost, profit and per-member profit for a membership program from fees, monthly spend commission, and fixed and variable costs.

    Math & Bit Manipulationmatharithmeticunit-conversionsimulation
  • BehavioralMediumModel answer
    Navigating Team Disagreements Over Shared Events

    Learn how to resolve team conflicts around off-site planning while balancing majority preferences, inclusion, individual privacy, and clear decision-making.

    Behavioralconflict resolutioninclusive leadershipcommunicationstakeholder management
  • Trees & GraphsMediumAuto-graded
    Fewest Removals to Cap a Rooted Tree's Height

    Count the minimum non-root nodes to remove from a parent-array tree, splicing children upward, so the height is at most a limit; tests subtree heights and a path-decomposition argument.

    Trees & Graphstreesubtree-heightiterative-bfsgreedy
  • System DesignMediumModel answer
    Design a B2B Product Engagement & Liking System

    Design a scalable backend architecture for product likes on a wholesale platform, handling dual-access querying, search result enrichment, counter aggregation, and brand metrics.

    System Designsystem-designdata-modelingcachingscalability
  • Data Structure DesignMediumModel answer
    Build an In-Memory Ledger with Deposits and Transfers

    Implement an in-memory ledger class supporting account creation, deposits and transfers, with clear return codes, invariants, retry safety and concurrency choices.

    Data Structure Designhash-mapclass-designidempotencyconcurrency
  • BehavioralMediumModel answer
    Demonstrate Deep Technical Troubleshooting and Problem Resolution

    Structure a behavioral response demonstrating technical investigation beyond initial surface assumptions to identify, verify, and permanently prevent a complex issue.

    BehavioralBehavioralProblem SolvingRoot Cause AnalysisLeadership
  • Dynamic ProgrammingHardAuto-graded
    Balanced Parentheses After Digit-Driven Removals

    Decide whether removing parentheses to satisfy per-digit quotas can leave a balanced bracket string, using a DP over balance and removal count.

    Dynamic Programmingdynamic-programmingstringsparenthesesstate-compression
  • Trees & GraphsEasyAuto-graded
    Prune a Labeled Tree by Forbidden Substring

    Recursively copy an n-ary tree while dropping every node whose label contains a given substring, together with its subtree, without mutating the input.

    Trees & Graphstreerecursiondfsstrings
  • BehavioralMediumModel answer
    Telling Your Career Story and Why This Company and Role

    Practice a concise answer on why you want to join a commerce-focused company, why you chose your degree and grad school path, and why an ML engineering role fits you now.

    Behavioralbehavioralmotivationcareer-narrativerecruiter-screen
  • BehavioralMediumModel answer
    Walking Through a System You Built: Architecture Review Prep

    Prepare to present a system you built with a diagram, an end-to-end flow, ownership boundaries, key decisions and alternatives, and how it fails and recovers, without inventing numbers.

    Behavioralarchitecture-reviewtechnical-deep-diveownershipdesign-tradeoffs
  • System DesignMediumModel answer
    Shipping a Persistent Streaming Chat Widget in a React App

    Plan how to build, test and safely release a streaming chat panel in a React dashboard, covering state, request races, token expiry, accessibility, feature flags and rollback.

    System Designreactstreamingfrontend-architecturetesting
  • Trees & GraphsMediumAuto-graded
    Players Whose Leaderboard Position Is Forced

    Find every player comparable to all others in a consistent win/loss DAG, using transitive reachability in both directions, ideally with bitsets.

    Trees & Graphsgraphtopological-sorttransitive-closurebitset
  • Math & Bit ManipulationEasyAuto-graded
    Product of Three Dice: Summary Statistics Report

    Enumerate all 216 outcomes of three dice to compute the mean, modes, prime probability and median of their product, and return a fixed risk note.

    Math & Bit Manipulationenumerationprobabilitycountingstatistics
  • Heaps, Sorting & SearchMediumModel answer
    Quicksort vs Mergesort: Hardware, Stability and Disk Trade-offs

    Compare two O(n log n) sorts by how they use caches, preserve tie order, resist bad inputs, and behave when data lives on disk instead of in memory.

    Heaps, Sorting & Searchquicksortmergesortstabilitycache-locality
  • Arrays & HashingEasyAuto-graded
    Find Lowest Cost Ticket Pair Across Consecutive Days

    Find the minimum combined cost of an outbound and return ticket where return happens strictly after departure.

    Arrays & Hashingarraysgreedyprefix-minimum
  • System DesignHardModel answer
    Design a Kubernetes-Based Object Metadata Store with Cassandra

    Design an API metadata service on Kubernetes and Cassandra featuring exact-once unique name constraints, soft-delete state transitions, and high-performance read strategies.

    System Designsystem-designcassandrakubernetesdistributed-systems
  • System DesignHardModel answer
    Real-Time Multiplayer Typing Race Backend with Penalty Freezes

    Design a backend for a multiplayer typing race where a mistyped key freezes input for 1.5 seconds, covering match servers, matchmaking, ratings, latency fairness and failure recovery.

    System Designreal-timewebsocketmatchmakingleaderboard
  • Arrays & HashingMediumAuto-graded
    Users Active for a Week Straight: Detect 7-Day Streaks in Event Logs

    Find users whose event log contains at least seven consecutive UTC calendar days of activity, using per-user day deduplication and a sorted streak scan.

    Arrays & Hashinghashingdatesstreakssorting
  • Dynamic ProgrammingEasyAuto-graded
    Bankrupt Risk in Dice Game

    Compute the exact probability of wealth hitting zero or below at any step during a finite sequence of random dice rolls.

    Dynamic Programmingdynamic-programmingmath-bitsstatistics
  • Arrays & HashingEasyAuto-graded
    Calculate Maximum Single-Trade Return

    Find the maximum non-negative profit from purchasing an asset on one day and selling it on a subsequent day.

    Arrays & Hashingarraysdynamic-programminggreedy-intervals
  • Math & Bit ManipulationEasyAuto-graded
    Middle Age Band Share Among Cycling Respondents

    Restrict a 3x3 survey table to one column and return an exact reduced fraction for a conditional probability.

    Math & Bit Manipulationprobabilityfractionstablesgcd
  • Data Structure DesignMediumAuto-graded
    Failure Streaks and Fix Times from a Live Test Log

    Process a stream of pass/fail log operations, answering shortest-fix-time and longest-concurrent-failure-window queries with an incremental, level-based data structure.

    Data Structure Designdesignstreamingintervalshash-map
  • System DesignMediumModel answer
    Resilient Streaming Chat Client for Android with MVVM and UDF

    Design a layered Android client for an LLM chat app covering streaming, cancellation, retries, offline history, immutable UI state, and lifecycle and process-death handling.

    System Designandroidmvvmkotlin-coroutinesstateflow