KatInterview

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

Interview Practice Problems

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

5969
Problems
2211
Auto-graded
15
Topics
273
Added today

Showing 91–120 of 5969 results

  • System DesignMediumModel answer
    Streaming Design for Cleaning and Near-Duplicate Removal of Web Crawl Text

    Design a horizontally scalable streaming system that extracts text from 100TB of crawled HTML, filters it, removes near-duplicates and reports live metrics, all in one pass.

    System Designsystem-designstreamingminhashlsh
  • Data Structure DesignMediumAuto-graded
    Design a Recency-Tracking Key-Value Store

    Simulate operations on a custom key-value map that efficiently queries the most recently updated active entry.

    Data Structure Designdesign-dslinked-listsarrays
  • Arrays & HashingMediumAuto-graded
    Per-Move Win Tracker for a Square Noughts-and-Crosses Grid

    Replay a sequence of marks on an n-by-n grid and report after each one whether the mover has completed a row, column or diagonal, using per-line counters.

    Arrays & Hashingsimulationcountingmatrixdiagonals
  • BehavioralEasyModel answer
    Navigating Team Dynamics, Ownership, and Cross-Functional Collaboration

    Articulate your ideal work environment and share a concrete experience leading through ambiguity, cross-functional disagreement, and high-impact analytics delivery.

    Behavioralbehavioralleadershipcross-functionalcollaboration
  • Machine LearningHardModel answer
    Designing an End-to-End Time-Series Forecasting Architecture

    Architect an end-to-end time-series forecasting solution covering data preparation, baseline and advanced models, multi-step strategies, non-leaky validation, and drift management.

    Machine Learningtime-seriesforecastingsystem-designmachine-learning
  • Trees & GraphsMediumAuto-graded
    Collect Allowed Values Depth by Depth from a Nested-List Tree

    Traverse a binary tree given as nested lists level by level and keep only values from an allowed set, preserving left-to-right order and empty levels.

    Trees & Graphsbinary-treelevel-orderbfsstack
  • BehavioralMediumModel answer
    Debugging a Hard Issue and Resolving a Design Dispute

    A two-part behavioral question on diagnosing an ambiguous technical fault with testable hypotheses, and on settling a design disagreement with a colleague using shared goals and evidence.

    Behavioralbehavioraldebuggingconflict-resolutiontechnical-leadership
  • Math & Bit ManipulationEasyAuto-graded
    Exact Staffing for a 2:1 Nail-to-Screw Quota

    Compute the headcount of two specialist worker types so a component quota splits exactly 2:1 with every worker at full capacity, or report that no such staffing exists.

    Math & Bit Manipulationmathratiosdivisibilitymodular-arithmetic
  • Machine LearningMediumModel answer
    Regional Weather Data: Metrics, Forward Selection, Online Slope

    Analyze multi-town daily temperature data: define volatility and similarity metrics, fit and validate a regression, run greedy town selection, and derive batch and streaming no-intercept slopes.

    Machine Learningregressiontime-seriesfeature-selectiononline-learning
  • BehavioralMediumModel answer
    Owning a Project Failure and the Fixes That Lasted

    Describe a project or technical decision of yours that went badly, own your part, explain how you contained the damage, and show the lasting changes you made and the evidence they worked.

    Behavioralbehavioralownershippost-mortemincident-response
  • BehavioralMediumModel answer
    Motivation and Career Criteria: Why This Company, Why Now

    Answer a screener's question on why you chose this company and which ranked, trade-off-aware criteria drive your next career move, with specific research and a fit check.

    Behavioralbehavioralmotivationcareer-prioritiescompany-research
  • SQL & DataMediumAuto-graded
    Consolidate E-Commerce Orders into Fact Records

    Process and aggregate relational records across multiple entity tables into a single denormalized fact dataset.

    SQL & Datasqlarraysdata-manipulationhash-map
  • Math & Bit ManipulationEasyAuto-graded
    Dice Duel Probability with Optional Blind Reroll

    Calculate the exact win probability in a dice duel where one player uses an optimal single blind reroll strategy.

    Math & Bit Manipulationmathprobabilitygreedy
  • SQL & DataMediumModel answer
    Monthly USD revenue pivot with as-of FX rate lookups

    Convert multi-currency sales to USD with an as-of rate join, pivot revenue by category and region, find August's top customer per region, and flag missing FX rates.

    SQL & Datasqlas-of-joinpivotwindow-functions
  • StringsEasyAuto-graded
    Pick the Tightest Wildcard Mask for a Bit String

    Scan a list of 0/1/? templates, keep those that fit a bit string, and return the one with the fewest wildcards, breaking ties by earliest position.

    Stringsstringspattern-matchinglinear-scantie-breaking
  • Greedy & IntervalsHardAuto-graded
    Union Overlapping Road Pieces That Share a Straight Line

    Group integer-point polylines by the exact line they lie on, then merge overlapping or touching extents on each line into one sorted point list.

    Greedy & Intervalsintervalsgeometrygcdhashing
  • Statistics & ExperimentsMediumModel answer
    Marketplace Experiments: Incentives, Losing Tests, Cancellations

    Four product-analytics scenarios for a three-sided delivery marketplace: courier incentive tests, a losing A/B result, a cancellation spike, and merchant promotion setup.

    Statistics & Experimentsab-testingmarketplacemetricsinterference
  • Machine LearningMediumModel answer
    Tokenizer Trade-Offs and Reference-Regularized Fine-Tuning

    Analyze structural trade-offs in LLM subword tokenization and explain the mathematical role of KL constraints during model alignment.

    Machine LearningLLMTokenizationNLPFine-Tuning
  • Data Structure DesignMediumModel answer
    Audited Lazy File Streaming with Generators, Decorators and with

    Build a decorator that audits a chunked file-reading generator's lifecycle, with deterministic file cleanup on completion, early exit, errors and garbage collection.

    Data Structure Designpythongeneratorsdecoratorscontext-managers
  • Heaps, Sorting & SearchMediumModel answer
    Find Index of Local Minimum Using Binary Search

    Locate a local minimum in an array of integers in logarithmic time while handling flat regions and boundaries.

    Heaps, Sorting & Searcharraysbinary-searchalgorithms
  • Machine LearningMediumModel answer
    Design a Real-Time Sequential Music Slate Recommender

    Design an end-to-end sequential music recommendation engine that adapts dynamically to real-time user actions while delivering 10-track slates within 200ms P99 latency.

    Machine Learningrecommendation-systemssequential-recommendationreal-time-mlsystem-design
  • StringsEasyAuto-graded
    Query-Driven Text Wrapper with Last-Line Balancing

    Parse a URL query string by hand, then greedily wrap the text to a width and fix a lone last-line word by borrowing from the previous line.

    Stringsstring-parsinggreedysimulationtext-wrapping
  • System DesignHardModel answer
    Architecting a Scalable, Fault-Tolerant Enterprise Feature Store

    Design a production ML feature store supporting streaming and batch ingestion, low-latency online serving, point-in-time correctness, and CI/CD feature governance.

    System Designmachine-learningsystem-designdata-engineeringdistributed-systems
  • Heaps, Sorting & SearchMediumModel answer
    Implement Weighted Index Selector with Efficient Retrieval

    Design a data structure that accepts an array of positive item weights and samples indices proportional to their relative weight values.

    Heaps, Sorting & Searchbinary searchprefix sumrandom samplingdesign-ds
  • Arrays & HashingEasyAuto-graded
    Find Peak Positions in an Integer Sequence

    Scan an integer list and return the indices of elements strictly larger than every neighbor that exists, handling the ends, plateaus, and tiny inputs correctly.

    Arrays & Hashingarraystraversalboundary-conditions
  • Machine LearningEasyModel answer
    Setting a Score Cutoff: Weighing Missed Positives Against False Alarms

    Explain how precision and recall shift as a classifier's score cutoff moves, and justify a production threshold given unequal error costs, limited capacity, and rare positives.

    Machine Learningprecision-recallclassification-thresholdimbalanced-datacalibration
  • BehavioralMediumModel answer
    Hiring Manager Chat: Showing Fit, Impact, and Leadership

    Prepare for a 30-minute conversation with a hiring manager covering motivation, a high-impact project, a cross-team conflict, handling ambiguity, and the kind of manager and culture you want.

    Behavioralbehavioralhiring-managerleadershipstar-method
  • Machine LearningHardModel answer
    Leak-Proof Preprocessing and Training Pipeline Design

    Design an end-to-end workflow that validates, cleans, splits, fits, and serves a model so that no statistic from held-out or future data influences training.

    Machine Learningdata-leakagepreprocessingpipelinesvalidation
  • SQL & DataEasyAuto-graded
    Month-over-Month Revenue Change per Store

    Group order records by store and calendar month, then compute each month's percentage change versus the store's previous active month, handling zero totals and gaps.

    SQL & Dataaggregationgroup-bywindow-functionsdictionaries
  • Data Structure DesignMediumModel answer
    Making a Memoizing Python Function Safe for Many Threads

    Critique a Python function that caches expensive results in a dict, then make it thread-safe so each input is computed once, without blocking cache hits or unrelated inputs.

    Data Structure Designpythonconcurrencycachinglocking