KatInterview

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

Coding Interview Problems

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

5991
Problems
2219
Auto-graded
15
Topics
270
Added today

Showing 1771–1800 of 2119 results

  • Trees & GraphsMediumAuto-graded
    Count Separate Land Regions in a Grid

    Tests flood-fill traversal to identify connected components in a 2D grid with four-directional adjacency.

    Trees & Graphsgraphsbfsdfsconnected-components
  • Dynamic ProgrammingMediumAuto-graded
    Tile a Word Using a Vocabulary List

    Tests whether a candidate can apply forward-reachability DP with a trie to decide if a string can be fully covered by vocabulary words end-to-end.

    Dynamic Programmingdynamic-programmingstringstrie
  • StringsMediumAuto-graded
    Maximum Unique Character Window

    Tests sliding window technique with hash map to track character positions and find the longest contiguous segment with all distinct characters.

    Stringssliding-windowhash-maptwo-pointers
  • Arrays & HashingMediumAuto-graded
    Organize Matrix Rings by Sorting Perimeters

    Tests matrix traversal and boundary extraction by sorting each rectangular ring of a matrix independently in clockwise order.

    Arrays & Hashingmatrixtraversalsorting
  • Arrays & HashingMediumAuto-graded
    Count Occurrences in Fixed-Size Subarrays

    Tests efficient sliding window maintenance to track element frequency across consecutive fixed-length subarrays.

    Arrays & Hashingsliding-windowarrayfrequency-counting
  • Arrays & HashingEasyAuto-graded
    Qualifying Run Detector in a Timestamped Event Log

    Tests whether a candidate can scan a sorted event log in one pass to count maximal same-type runs that meet minimum length and duration thresholds.

    Arrays & Hashingarrayssliding-windowsimulation
  • Arrays & HashingEasyAuto-graded
    Clone a List with Index-Based Cross References

    Tests your ability to perform a deep copy of a nested list structure while preserving integer-indexed references between elements.

    Arrays & Hashingarraysdeep-copylist-manipulation
  • Greedy & IntervalsMediumAuto-graded
    Task Scheduler with Cooldown Periods

    Tests greedy scheduling with frequency counting to compute minimum execution time under per-task-type cooldown constraints.

    Greedy & Intervalsgreedyfrequency-countingscheduling
  • Data Structure DesignMediumAuto-graded
    Flatten and Filter a Nested Configuration Tree

    Tests the ability to write an iterator-style traversal over arbitrarily nested dicts and lists to extract leaf values matching a type filter.

    Data Structure Designdata structuresrecursioniteratorsnested data
  • Math & Bit ManipulationEasyAuto-graded
    Unit Sales Target After Fixed Cost Increase

    Tests cost-volume-profit analysis by computing last period's profit and the sales volume needed to maintain that profit when fixed costs rise.

    Math & Bit Manipulationmathbusiness-logicformulas
  • Arrays & HashingEasyAuto-graded
    Align Temperature Readings with Prior Humidity Data

    Tests ability to perform temporal joins on sorted time-series data with per-key state tracking and careful timestamp comparison.

    Arrays & Hashingtime-seriestwo-pointershash-table
  • Data Structure DesignMediumAuto-graded
    Simulate a Price-Level Tracker for Buy and Sell Orders

    Tests your ability to combine a hash map with a lazy-deletion heap to track best bid and ask prices across a sequence of order book operations.

    Data Structure Designheaphash-maplazy-deletionsimulation
  • Greedy & IntervalsMediumAuto-graded
    Balance Wealth Through Optimal Integer Transfers

    Tests greedy two-pointer coordination and integer division to equalize values with minimal movement.

    Greedy & Intervalsgreedytwo-pointersmathsimulation
  • Greedy & IntervalsMediumAuto-graded
    Minimum Transfers to Rebalance a Four-Zone Warehouse

    Tests whether you can compute the minimum number of item relocations to rebalance inventory across four warehouse zones using surplus/deficit reasoning.

    Greedy & Intervalsgreedyarraysoptimization
  • Arrays & HashingMediumAuto-graded
    Minimum Round-Trip Cost with Ordered Dates

    Tests prefix-minimum optimization to select two array indices under ordering constraints while minimizing their combined cost.

    Arrays & Hashinggreedyprefix-minimumarray-optimization
  • Heaps, Sorting & SearchMediumAuto-graded
    Select K Elements with Highest Occurrence Count

    Tests frequency counting with hash maps and efficient selection of top elements using heap-based algorithms.

    Heaps, Sorting & Searchhash-mapheapcountingfrequency-analysis
  • Arrays & HashingHardAuto-graded
    Group Activity Logs into Time-Based Sessions

    Tests time-series grouping, datetime arithmetic, gap-based segmentation, and aggregation with distinct counts.

    Arrays & Hashingtime-seriesgroupingdatetimeaggregation
  • Heaps, Sorting & SearchMediumAuto-graded
    Find Path with Highest Bottleneck Value in Grid

    Tests combining priority-queue graph traversal with bottleneck optimization to find the path whose minimum cell value is maximized.

    Heaps, Sorting & Searchgraph-traversaldijkstrabinary-searchunion-find
  • Trees & GraphsMediumAuto-graded
    Collect Binary Tree Node Values in Left-Root-Right Order

    Tests binary tree traversal using an explicit stack to visit nodes in left-root-right sequence from a level-order serialized input.

    Trees & Graphsbinary-treetraversalstackdeserialization
  • Heaps, Sorting & SearchMediumAuto-graded
    Running Median with Power-of-Two Bucket Tracking

    Tests two-heap streaming median maintenance combined with exact integer floor-log₂ bucketing to place each median into its enclosing power-of-two interval.

    Heaps, Sorting & Searchheapsmedianbit-manipulation
  • Data Structure DesignEasyAuto-graded
    Track User Votes with Deduplication

    Tests ability to maintain stateful vote tracking with idempotent operations and bounded history retrieval

    Data Structure Designhash-tablestate-managementdeduplication
  • Arrays & HashingMediumAuto-graded
    Subarrays with Odd Zero Frequency

    Tests understanding of prefix parity tracking and combinatorial counting to efficiently solve subarray problems.

    Arrays & Hashingprefix-sumtwo-pointersmath
  • Trees & GraphsMediumAuto-graded
    Filter Users by Active Connection Threshold

    Tests graph maintenance with dynamic edge insertion and deletion, proper handling of duplicates and missing edges, and final degree counting.

    Trees & Graphsgraphshash-tablesimulation
  • StringsMediumAuto-graded
    Minimum Edit Distance Between Two Palindromes

    Tests understanding of edit distance (insert, delete, substitute) by computing the minimum operations needed to transform one palindrome into another, reinforcing dynamic programming on strings.

    Stringsstringsdynamic programmingedit distancepalindromes
  • Math & Bit ManipulationEasyAuto-graded
    Calculate Weight in a Nested Balanced Mobile System

    Tests systematic application of balance constraints in a multi-level mobile where equal-arm bars divide weight evenly.

    Math & Bit Manipulationalgebrarecursionmathlogic
  • Greedy & IntervalsMediumAuto-graded
    Combine Overlapping Intervals

    Tests interval merging through sorting and linear scanning, focusing on edge-case handling for touching and nested ranges.

    Greedy & Intervalsintervalssortingarrays
  • Trees & GraphsMediumAuto-graded
    Minimum-Length Root-to-Leaf Path with Target Sum

    Tests tree traversal with state tracking to identify the shortest valid path satisfying a sum condition.

    Trees & Graphsbinary-treedfspath-finding
  • Math & Bit ManipulationEasyAuto-graded
    Digital Root via Modular Arithmetic

    Tests understanding of modular arithmetic by computing the digital root of a large integer without repeatedly summing digits in a loop.

    Math & Bit Manipulationmathmodular arithmeticnumber theory
  • Trees & GraphsMediumAuto-graded
    Signal Propagation Time to All Destinations

    Tests understanding of multi-source BFS to compute the longest shortest path from any source to all required destinations on a grid with obstacles.

    Trees & Graphsbreadth-first-searchgridmulti-source-bfsshortest-path
  • Arrays & HashingHardAuto-graded
    Survey Gender Distribution Probability

    Compute probabilities of observing specific gender counts in survey samples under binomial and hypergeometric models.

    Arrays & Hashingprobabilitystatisticscombinatorics