KatInterview

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

Interview Practice Problems

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

6093
Problems
2258
Auto-graded
15
Topics
273
Added today

Showing 2161–2190 of 6093 results

  • System DesignEasyModel answer
    Completely Purge Docker Host Resources

    Demonstrate how to safely and completely clear containers, images, volumes, custom networks, and build caches from a Docker daemon environment.

    System Designdockerdevopslinuxcli
  • Trees & GraphsMediumAuto-graded
    Verify Root-to-Leaf Sequence in Binary Tree

    Check if a list of integers forms a complete valid root-to-leaf path in a binary tree given as an adjacency table.

    Trees & Graphstrees-graphstreearray
  • Statistics & ExperimentsEasyModel answer
    Quantifying Weather Impact on Mental Well-Being

    Design an observational study using panel data to isolate the causal impact of ambient temperature on daily mood scores while controlling for confounders and reporting bias.

    Statistics & Experimentscausal inferencepanel datafixed effectsobservational study
  • System DesignHardModel answer
    Design a Flash-Sale Resilient Inventory Engine

    Design a multi-warehouse e-commerce inventory system handling flash sales without overselling, focusing on high availability, concurrency control, and idempotency.

    System Designsystem-designconcurrencydistributed-systemscaching
  • Statistics & ExperimentsMediumModel answer
    Modeling Early-Life Payment Counts and Their Drift Over Time

    Model a skewed, zero-heavy count of early user payments, place its key summary statistics, predict how they move at a later horizon, and pick robust reporting metrics.

    Statistics & Experimentscount-datazero-inflationheavy-tailssurvivorship-bias
  • Machine LearningHardModel answer
    Classifying Imbalanced Clinical Outcomes Under Heavy Missing Data

    Architect an end-to-end binary classification pipeline for readmissions with missing data, extreme class imbalance, metrics choice, and feature-engineered logistic regression.

    Machine Learningmissing-dataclass-imbalancelogistic-regressionevaluation-metrics
  • Machine LearningMediumModel answer
    Impact of Zero Initialization on Neural Networks and Linear Models

    Analyze why setting all weights to zero causes hidden unit symmetry in deep networks while remaining functional for single-layer models.

    Machine Learningdeep-learningneural-networksgradient-descentmodel-architecture
  • Arrays & HashingEasyAuto-graded
    Fill a Grid With Connected Crop Strips in Snake Order

    Build an N by M grid in which each crop forms one edge-connected region, using a snake-order fill with a fixed, deterministic output.

    Arrays & Hashinggridconstructionsimulationserpentine
  • SQL & DataMediumModel answer
    Exposure Rate of Violating Content: Ex-ante vs Ex-post Views

    Write SQL that labels each view by the moderation decision known at view time and by the final decision, computes daily prevalence per country, and ranks the top creators by violating share.

    SQL & Datasqlwindow-functionsas-of-joinlateral-join
  • Data Structure DesignMediumModel answer
    Design a Multi-Tenant Security Event Enrichment Engine

    Design and implement an in-memory pipeline to enrich telemetry events and evaluate dynamic suppression rules with multi-tenant scoping and fault tolerance.

    Data Structure Designdesignobject-orientedmulti-tenancypipelines
  • Statistics & ExperimentsEasyModel answer
    Determining Initial-Year Net Profit Percentage

    Calculate first-year net profit margin given sales volume, unit pricing, unit cost, and fixed operating expenses.

    Statistics & Experimentsunit economicsprofit marginfinancial metricsquantitative reasoning
  • Arrays & HashingMediumModel answer
    Uniform Random Array Partitioning into K Segments

    Divide an array into K non-empty contiguous slices such that every valid partition is equally likely to be selected.

    Arrays & Hashingarraysmath-bitsheaps-sorting
  • Stacks & QueuesEasyAuto-graded
    Stack Simulator with Constant-Time Minimum Queries

    Simulate a sequence of stack commands and answer minimum queries in constant time by tracking the running minimum alongside each element.

    Stacks & Queuesstackdesignsimulationauxiliary-stack
  • Data Structure DesignHardAuto-graded
    Running Bit-Entropy of a Token Feed with Stable Updates

    Maintain Shannon entropy of a growing token stream with constant-time updates and queries, avoiding catastrophic cancellation when one token dominates.

    Data Structure Designstreamingnumerical-stabilityhash-mapentropy
  • System DesignMediumModel answer
    Design a Real-Time Thermal Telemetry & Ingestion System

    Design an IoT telemetry platform ingesting half a million sensor readings per second, featuring low-latency current state queries, delayed data processing, and downsampled long-term storage.

    System Designsystem-designiottime-seriesstreaming
  • Data Structure DesignMediumModel answer
    Design a Support Agent Dispatcher with Interruption Handling

    Design an in-memory dispatch engine that pairs queued support tickets with available agents, extended to handle mid-task agent breaks and fair ticket re-queuing.

    Data Structure Designdesign-dsstacks-queuesheaps-sorting
  • Arrays & HashingEasyAuto-graded
    Most Frequent Log Error Codes in Time Interval

    Filter log entries within a half-open time interval, compute occurrence frequencies, and retrieve the top k error codes sorted by frequency and string order.

    Arrays & HashingArrays & HashingSortingHash Table
  • Machine LearningMediumModel answer
    Foundations of Generalization Error and Deep Network Gradient Dynamics

    Break down bias-variance decomposition, diagnose deep learning overfitting with remedies, and derive vanishing gradient mechanics alongside modern structural solutions.

    Machine Learningbias-varianceoverfittingvanishing-gradientsdeep-learning
  • System DesignHardModel answer
    Architecting a High-Throughput Multi-Region Data Service

    Design a multi-region metadata engine processing 50k peak QPS under 100 ms p95 latency, complete with capacity sizing, queueing performance modeling, and resiliency patterns.

    System Designsystem-designdistributed-systemsmulti-regioncapacity-planning
  • Dynamic ProgrammingMediumAuto-graded
    Maximum Independent Set on Line and Binary Tree

    Find the maximum weight independent set for both a linear sequence and a binary tree network under non-adjacency constraints.

    Dynamic Programmingdynamic-programmingtrees-graphsarrays
  • Data Structure DesignMediumModel answer
    Fix a Rotating Server Picker, Then Build a Hash Ring

    Find and fix the bugs in a round-robin server selector that handles pool changes and threads, then build a consistent-hash ring with virtual nodes that keeps key movement minimal.

    Data Structure Designload-balancingconsistent-hashingdebuggingconcurrency
  • Machine LearningMediumModel answer
    Dropping the Mean: RMSNorm Versus LayerNorm in Transformers

    Contrast LayerNorm and RMSNorm formulas, what removing centering changes, and why many large language models adopt the simpler normalization.

    Machine Learningtransformersnormalizationlayernormrmsnorm
  • Arrays & HashingMediumAuto-graded
    Validated Config-Driven LiDAR Scan Processor

    Validate a declarative list of crop and rigid-transform steps up front, then apply them in order to a point list while tracking metadata, without mutating the inputs.

    Arrays & Hashingsimulationvalidationmatrix-transformfiltering
  • System DesignHardModel answer
    Architecting a Card Network Transaction Switch

    Design a card-network transaction switch that routes authorizations to unreliable issuer banks, prevents duplicate charges, keeps an auditable ledger, and keeps card data tokenized.

    System Designpaymentsidempotencydistributed-transactionssaga
  • Arrays & HashingMediumModel answer
    Paginated API Fetching and Data Merging

    Fetch paginated JSON payloads from two separate endpoints, defensively clean and transform records, and merge them on a common key preserving the original sequence.

    Arrays & Hashingpaginationhttp-requestshash-tabledata-cleaning
  • Machine LearningMediumModel answer
    Reviewing Machine Learning Data Cleaning Code and Pipeline Design

    Evaluate an ML preprocessing codebase for design decisions, sklearn API conventions, data leakage prevention, code quality issues, and critical unit testing strategy.

    Machine Learningdata-preprocessingscikit-learncode-reviewunit-testing
  • Statistics & ExperimentsMediumModel answer
    Linear Regression Assumptions and Handling Correlated Predictors

    Describe the classical assumptions behind least squares, explain how correlated predictors affect inference, and cover diagnostics, fixes and the exactly collinear case.

    Statistics & Experimentslinear-regressionolsmulticollinearityvif
  • BehavioralHardModel answer
    Nine Leadership Stories: Behavioral Prep for a Senior Loop

    Prepare structured, quantified stories about missed commitments, root-cause digging, fast decisions, pushback, simplification, disagreement, obstacles, raising standards, and ownership.

    BehavioralbehavioralleadershipSTARownership
  • Trees & GraphsMediumAuto-graded
    Merge Per-User Action Sequences into a Counted Prefix Tree

    Group event records by user, order each user's events by time, merge the sequences into a prefix tree with distinct-user counts, and print it in a fixed preorder format.

    Trees & Graphstriehash-mapstable-sortdfs
  • SQL & DataMediumModel answer
    Trailing Week Totals of Voice Assistant Replies per Device

    Write a query that gives each device's total replies over the current day and the six days before it, handling duplicate rows and missing dates correctly.

    SQL & Datasqlwindow-functionstime-seriespandas