KatInterview

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

Interview Practice Problems

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

6046
Problems
2239
Auto-graded
15
Topics
273
Added today

Showing 4651–4680 of 6046 results

  • Stacks & QueuesMediumAuto-graded
    Trim a Bracket String to Its Longest Balanced Form

    Tests stack-based bracket matching: find and remove the fewest characters from a parentheses-only string to leave a fully balanced result.

    Stacks & Queuesstacksstringsgreedy
  • System DesignMediumModel answer
    From Virtual Address to Physical Memory: A Full Walkthrough

    Trace every step a CPU takes to resolve a virtual address — TLB, page-table walk, MMU checks, page faults, and context-switch invalidation.

    System Designoperating-systemsvirtual-memoryTLBMMU
  • Data Structure DesignMediumModel answer
    Build an In-Memory Notebook System with Rollback

    Design and implement a versioned in-memory notebook system supporting CRUD, case-insensitive search, user management, and full state rollback via a change log.

    Data Structure Designversioningooprollbackhashmap
  • Statistics & ExperimentsMediumModel answer
    Measuring and Experimenting on Spam Without a Label Table

    Design proxy metrics to monitor spam and user experience, diagnose a drop in report rate, and build a valid A/B test when spammers are rare.

    Statistics & Experimentsmetric-designexperiment-designspama-b-testing
  • Arrays & HashingMediumAuto-graded
    Sorted Array: All Unique Pairs With a Given Sum

    Tests whether a candidate can apply the two-pointer pattern on a sorted array to collect every distinct value pair that adds up to a target, without emitting duplicates.

    Arrays & Hashingtwo-pointerssortingdeduplication
  • Arrays & HashingMediumAuto-graded
    Paginate and Budget-Trim a Chat History

    Assemble a chronological transcript from paginated data, then reduce it to fit a token limit by removing the earliest messages.

    Arrays & Hashingpaginationsliding-windowsimulation
  • SQL & DataMediumModel answer
    Rolling Window Metrics for Digital Ad Campaign Data

    Compute impression rankings, conversion rates by format, per-user revenue, and peak traffic hours from ad event tables using SQL aggregation and joins.

    SQL & Datasqlaggregationjoinswindow-functions
  • Trees & GraphsMediumAuto-graded
    Recursive Schema Validation

    Tests recursive validation of nested dictionaries against a schema with type and presence requirements.

    Trees & Graphsrecursionvalidationnested-structures
  • System DesignMediumModel answer
    Card authorization with deferred tips and batch settlement

    Build a payment platform for retail terminals that authorizes transactions, accepts post-authorization tip adjustments, and settles batches nightly.

    System Designpaymentsdistributed-systemsidempotencybatch-processing
  • StringsEasyAuto-graded
    Fixed-Width Substitution Cipher: Encode and Decode

    Tests your ability to apply character-to-code substitution and reverse it using an inverted dictionary for O(1) chunk lookups.

    Stringsstringshash-mapsimulation
  • Stacks & QueuesMediumAuto-graded
    Identify Invalid Parentheses for Removal

    Tests stack-based matching to find the minimum set of parenthesis indices that must be removed to balance a string.

    Stacks & Queuesstackstring-processinggreedy
  • Linked ListsMediumAuto-graded
    Singly Linked List Symmetry Check (Non-Destructive)

    Tests whether a candidate can verify palindrome structure on a singly linked list in O(n) time and O(1) space while restoring every pointer before returning.

    Linked Liststwo-pointerslinked-listsin-place
  • BehavioralMediumModel answer
    Leading Cross-Functional Teams Through Conflict and Recovery

    Demonstrate leadership across engineering teams facing priority conflicts, trade-off decisions under pressure, and recovering from a product that didn't meet user needs.

    Behavioralleadershipconflict-resolutionstakeholder-managementproduct-delivery
  • SQL & DataMediumModel answer
    Filter users by location and rank forums by activity

    Write SQL to classify users as US-based using profile and IP data, then identify the top forums by post volume and distinct contributors over a rolling 30-day window.

    SQL & Datasqlaggregationjoinswindow-functions
  • System DesignEasyModel answer
    Build a Regression Test Suite for a REST API

    Design an automated testing strategy for a three-endpoint user service that survives frequent deployments without breaking existing behavior.

    System DesigntestingREST APICI/CDtest automation
  • Data Structure DesignMediumAuto-graded
    Circular Buffer Deque with Auto-Resize

    Tests ability to build a double-ended queue on a ring-indexed array that doubles in capacity when full, keeping all operations amortized O(1).

    Data Structure Designdequecircular-arrayamortized-analysis
  • Statistics & ExperimentsMediumModel answer
    Should You Greenlight Another Season or Invest in New Content?

    Design an incremental ROI framework, a cannibalization adjustment, and a causal experiment to decide whether renewing a streaming series is worth the budget.

    Statistics & Experimentsexperimentationcausal-inferenceproduct-analyticsROI
  • Linked ListsMediumAuto-graded
    Ordered Stage Queue: Simulate Item Promotion and Demotion

    Tests whether a candidate can model item movement across ordered stages using a normalized O(1)-per-move doubly linked list structure.

    Linked Listslinked-listsimulationdesign
  • Trees & GraphsMediumAuto-graded
    Lexicographic Topological Sort of a Task Graph

    Tests directed graph construction, cycle detection via Kahn's algorithm, and deterministic tie-breaking with a min-heap to produce the lexicographically smallest valid ordering.

    Trees & Graphstopological-sortgraphsheaps
  • Stacks & QueuesEasyAuto-graded
    Validate Nested Chemical Formula Brackets

    Tests bracket matching with domain-specific pairing rules where round, square, and curly brackets each have distinct valid nesting constraints.

    Stacks & Queuesstacksbracket matchingsimulationstrings
  • System DesignMediumModel answer
    Chunked Upload Pipeline with Async Processing

    Design a system that handles large file uploads with resumability, processes them through async validation and transformation stages, and notifies users of completion.

    System Designdistributed-systemsasync-processingfile-uploadscalability
  • Heaps, Sorting & SearchMediumAuto-graded
    Busiest Conference Room Tracker

    Tests the ability to simulate event scheduling with delayed assignments using two priority queues to track which resource handles the most requests.

    Heaps, Sorting & Searchheapsimulationgreedypriority-queue
  • Data Structure DesignMediumModel answer
    React Grid with Formula Dependencies and Virtual Rendering

    Build a React component that displays a large editable grid, evaluates cell formulas with references, detects cycles, and renders only visible rows.

    Data Structure Designreactvirtualizationmemoizationdependency-graph
  • Trees & GraphsMediumAuto-graded
    Count Landlocked Islands

    Tests connected-component detection in grids with boundary constraints using BFS or DFS traversal.

    Trees & Graphsbfsdfsconnected-componentsgrid-traversal
  • BehavioralHardModel answer
    Justify a Hard Technical Trade-Off From Your Own Work

    Walk through a real design decision where you weighed competing constraints, explain what you gave up and why, and reflect honestly on what you'd do differently today.

    Behavioraltrade-offssystem designtechnical leadershipdecision making
  • Greedy & IntervalsMediumAuto-graded
    Consolidate Overlapping Ranges

    Tests interval merging logic, correctly handling touching boundaries, nested ranges, and producing sorted disjoint output.

    Greedy & Intervalsintervalssortinggreedy
  • BehavioralMediumModel answer
    Articulate Motivation and Fit for a Mission-Driven Company

    Demonstrate authentic alignment with an organization's mission, values, and challenges through personal narrative and concrete technical contributions.

    Behavioralmotivationvalues-alignmentstorytelling
  • Machine LearningHardModel answer
    Building an Intelligent Technical Support Agent with RAG and RL

    Design a multi-turn AI support agent that retrieves documentation, reasons about queries, and optimizes conversation strategy using retrieval systems and RL.

    Machine Learningnlpreinforcement-learningragllm-agents
  • System DesignMediumModel answer
    Concurrency, Struct Layout, Polymorphism, and Idempotency Explained

    Answer four core software engineering questions covering thread synchronization, memory padding, OOP polymorphism, and idempotent operations.

    System Designconcurrencymemory-layoutobject-oriented-programmingdistributed-systems
  • System DesignEasyModel answer
    Design a Dispute Record Ingestion and Daily Batch Export System

    Design a system that reliably ingests high-volume dispute events from external networks and exports a daily batch file to a downstream accounting system.

    System Designdistributed-systemsdata-pipelineidempotencybatch-export