KatInterview

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

Interview Practice Problems

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

6036
Problems
2235
Auto-graded
15
Topics
273
Added today

Showing 4831–4860 of 6036 results

  • Arrays & HashingMediumAuto-graded
    Suffix Maximum Frequency Count

    Computes how many times the largest element appears in each suffix of an array using a single backward scan.

    Arrays & Hashingarrayssuffix-queriessingle-pass
  • Trees & GraphsHardAuto-graded
    Reduce Worst-Case Coverage Gap with One New Relay Node

    Tests binary search on answer combined with multi-source BFS and 2D prefix sums to optimally place one relay node and minimize the maximum Chebyshev coverage distance.

    Trees & Graphsbinary-searchbfsmatrixprefix-sums
  • System DesignMediumModel answer
    Design a Link Shortening Service: Codes, Storage, and Redirects

    Design a system that converts long URLs into short codes and redirects visitors at scale, covering code generation, storage choices, caching, and failure handling.

    System Designurl-shortenercachingdistributed-systems
  • Machine LearningHardModel answer
    Designing a Multimodal Classifier for Prohibited Item Listings

    Design an end-to-end ML system that detects policy-violating item-for-sale posts by combining text, image, and behavioral signals at platform scale.

    Machine Learningmultimodalcontent-moderationclassificationsystem-design
  • Linked ListsMediumAuto-graded
    Interleave Two Linked Lists by Position Parity

    Tests pointer manipulation and node reordering by splitting a singly linked list (given as an array) into odd- and even-indexed sublists and merging them in a specific interleaved pattern.

    Linked Listslinked listspointer manipulationreorderingarray simulation
  • System DesignMediumModel answer
    Designing a Scalable Concert Ticketing System

    Build the backend for a live event ticketing platform that prevents overselling during high-traffic on-sales while managing seat reservations and payments.

    System Designdistributed-systemsconcurrencytransactionsscalability
  • Machine LearningHardModel answer
    Techniques to Control Overfitting in Neural Networks

    Describe regularization methods that prevent overfitting, comparing weight penalties with dropout and explaining their train/test differences.

    Machine Learningregularizationoverfittingdropoutweight-decay
  • Statistics & ExperimentsMediumModel answer
    Measuring Pickup Time Impact in a Two-Sided Marketplace

    Design an experiment to measure how changes in estimated pickup time affect rider behavior in a ride-sharing platform.

    Statistics & Experimentscausal-inferenceexperiment-designmarketplace-dynamics
  • Data Structure DesignMediumAuto-graded
    Simulate a Nested Tic-Tac-Toe Game with Board-Routing Rules

    Tests state management for a two-layer game board with recursive win detection and dynamic move constraints based on previous plays.

    Data Structure Designsimulationgame-theorystate-machine
  • BehavioralHardModel answer
    Reasoning About AI Capabilities, Risks, and Safety Principles

    Articulate your understanding of AI safety concepts, distinguish risk categories, evaluate tradeoffs between potential harms and benefits, and explain how to act under uncertainty.

    Behavioralai-safetyrisk-analysiscritical-thinkingvalues-alignment
  • System DesignMediumModel answer
    Why One Process Never Gets CPU Time on a Two-Core System

    Given five identical CPU-bound processes on two cores where four run fairly and one runs never, pinpoint which OS subsystem is responsible and explain what can go wrong there.

    System Designoperating-systemsschedulingconcurrencystarvation
  • System DesignHardModel answer
    Design a Multi-Tenant Real-Time Chat Platform at Global Scale

    Design a collaborative messaging system supporting thousands of isolated organizations, millions of concurrent users, real-time delivery under 200ms, and global traffic distribution.

    System Designwebsocketsmulti-tenancyfan-outkafka
  • BehavioralMediumModel answer
    Values Under Pressure: Safety, Ethics, and Updating Beliefs

    An open conversation probing your reasoning on technical risk, moral trade-offs, and changing your mind when evidence shifts.

    Behavioralleadershipethicsjudgment
  • Machine LearningMediumModel answer
    Audio ML Pipeline: Preprocessing Choices and Training Strategy

    Design preprocessing and training for an audio ML system, comparing feature representations, normalization, augmentation, and explaining a complete training workflow.

    Machine Learningaudio-mlfeature-engineeringmodel-trainingdata-pipeline
  • Statistics & ExperimentsMediumModel answer
    Simpson's Paradox: Algebra, Causality, and When to Stratify

    Build a numeric reversal from scratch, derive the bias formula, connect it to causal graphs, and explain when the aggregate is the right answer versus when you must condition.

    Statistics & Experimentssimpson's paradoxconfoundingcausal inferencestratification
  • SQL & DataMediumModel answer
    Resilient Paginated API Client with Aggregation

    Build a robust script that authenticates against a paginated REST API, handles rate limits and bad records, and produces serialized output plus top-k category aggregates.

    SQL & Datapythonrest-apipaginationdata-pipeline
  • BehavioralMediumModel answer
    Navigating Conflict: Peers, Cross-Team, and a Resistant Mentee

    Three behavioral prompts on resolving disagreements with a peer, a partner team, and a junior engineer who pushes back on your guidance.

    Behavioralconflict resolutioninfluence without authoritymentorshipcross-functional collaboration
  • System DesignMediumModel answer
    Design an In-Process Record Buffer with Async Disk Writes

    Design a thread-safe, memory-bounded write buffer that batches records in memory and drains them to disk via a background thread under high producer concurrency.

    System Designconcurrencybufferingbackpressurebackground-threads
  • Data Structure DesignMediumAuto-graded
    Duplicate Linked List and Simulate LRU Cache Operations

    Tests linked list deep copying with arbitrary pointers and implementing an LRU cache with O(1) operations using hash maps and doubly-linked lists.

    Data Structure Designlinked-listshash-mapdesignpointers
  • Stacks & QueuesMediumModel answer
    Stack Trace Event Stream from Periodic Samples

    Convert a sequence of call stack snapshots into function entry and exit events with configurable debouncing to filter transient frames.

    Stacks & Queuesstacksarrayssimulationstate-machine
  • StringsMediumModel answer
    Five Python Fundamentals: Iteration, Collections, and Edge Cases

    Write five short functions covering string repetition, list transformation, FizzBuzz, word counting, and finding the second-largest unique integer.

    Stringspythonfundamentalsedge-cases
  • Machine LearningMediumModel answer
    Modeling Quote Win Probability from RFQ Trade Logs

    Build features from RFQ trading data, fit a logistic win-probability model, and quantify your pricing signal edge relative to competitors.

    Machine Learningfeature-engineeringlogistic-regressioncensored-datatrading
  • Arrays & HashingEasyAuto-graded
    Rank Nearest Neighbors by Mean Squared Error

    Tests k-nearest neighbors search with distance computation, NULL handling, and top-k selection with tie-breaking.

    Arrays & Hashingsimilaritydistance-metricsrankingdata-processing
  • SQL & DataMediumAuto-graded
    Calculate Engaged User Percentage by Region

    Classify users as engaged based on activity frequency and device diversity, then compute the engaged-user rate per region.

    SQL & Datadata-manipulationaggregationfiltering
  • Data Structure DesignHardModel answer
    In-Memory Transaction Ledger with Aliases and History

    Implement a timestamped in-memory ledger supporting deposits, cashback transfers, scheduled execution, account merging with alias resolution, and point-in-time balance queries.

    Data Structure Designunion-findheapbinary-searchsimulation
  • Statistics & ExperimentsMediumModel answer
    Metrics for Fraud Detection System Evaluation

    Design monitoring metrics to evaluate a system detecting fake engagement, distinguish organic virality from coordinated manipulation, and validate true performance improvements.

    Statistics & Experimentsmetricsfraud-detectionexperimentationprecision-recall
  • System DesignMediumModel answer
    React Community Board: Voting, Re-Ranking, and Sticky Posts

    Build a React feed where upvotes and downvotes re-sort posts by score and designated sticky posts always stay above the ranked list.

    System Designreactstate-managementaccessibilityoptimistic-updates
  • Machine LearningMediumModel answer
    Build a Document QA System with Grounded LLM Responses

    Design an end-to-end system that answers user questions by retrieving relevant passages from a large corpus and generating responses with citations.

    Machine Learningraginformation-retrievalllmproduction-ml
  • BehavioralMediumModel answer
    Walk Me Through Your Most Impactful Technical Project

    Describe a project where your decisions drove measurable outcomes, covering problem context, ownership, tradeoffs, results, and what you'd do differently.

    Behavioralownershipimpacttradeoffsleadership
  • Machine LearningEasyModel answer
    Optimization Dynamics: Learning Rates and Gradient Flow

    Explain how learning rate magnitude affects training stability and why gradient attenuation disproportionately impacts early layers in deep networks.

    Machine Learningoptimizationgradientsdeep-learning