KatInterview

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

Interview Practice Problems

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

5985
Problems
2218
Auto-graded
15
Topics
271
Added today

Showing 1951–1980 of 2218 results

  • Trees & GraphsMediumAuto-graded
    Maximum Independent Set Weight on a Tree

    Tests tree DP by computing the maximum total weight of a node subset where no two chosen nodes share an edge (weighted tree independent set).

    Trees & Graphstreesdynamic programminggraph traversal
  • Data Structure DesignMediumAuto-graded
    Schema-Free Record Store with Column Indexing

    Tests ability to design an in-memory key-value store with flexible schemas, column-based retrieval, and multi-field filtering logic.

    Data Structure Designhash-tablesindexingdata-structures
  • Arrays & HashingMediumAuto-graded
    Combine Two Ordered Lists

    Tests the ability to implement the classic two-pointer merge algorithm in linear time.

    Arrays & Hashingtwo-pointerssortingmerge-algorithm
  • Trees & GraphsMediumAuto-graded
    Cell Formula Evaluator with Cycle Detection

    Build a mini spreadsheet engine that evaluates formulas, detects circular dependencies, and handles dynamic updates.

    Trees & Graphsgraphsdfsrecursionmemoization
  • Math & Bit ManipulationMediumAuto-graded
    Find Non-Overlapping String Pairs by Letter Sets

    Evaluates efficient character set representation using bit manipulation and frequency-based combinatorial counting.

    Math & Bit Manipulationbit-manipulationarraysstringshashing
  • Dynamic ProgrammingMediumAuto-graded
    Find Lexicographically Smallest Expression to Match Target

    Tests interval dynamic programming to build fully parenthesized expressions using all numbers in order with +, -, * operators to reach a target value.

    Dynamic Programmingdynamic-programmingrecursionstrings
  • StringsEasyAuto-graded
    Compress and Decompress a Run-Length Encoded String

    Tests ability to implement both directions of run-length encoding: compressing a plain string into a compact form and expanding it back, handling edge cases carefully.

    Stringsstringsencodingparsing
  • Greedy & IntervalsMediumAuto-graded
    Maximize Tasks Completed Before Their Deadlines

    Tests whether candidates can apply a greedy scheduling-with-deadlines strategy to select and order tasks that maximize the count of on-time completions.

    Greedy & Intervalsgreedyintervalsscheduling
  • Trees & GraphsMediumAuto-graded
    Count Separated Land Regions in a Binary Matrix

    Tests graph traversal skills by identifying connected components in a 2D grid using BFS or DFS.

    Trees & Graphsgraph-traversalbfsdfsconnected-components
  • Trees & GraphsMediumAuto-graded
    Largest Connected Land Region

    Measures understanding of graph traversal on a grid to compute connected-component sizes using four-directional adjacency.

    Trees & Graphsgraphsdfsconnected-componentsgrid-traversal
  • Trees & GraphsMediumAuto-graded
    Grid Infection Spread with Time Limit

    Tests BFS-based grid simulation with simultaneous state updates, barrier cells, and handling extremely large iteration counts efficiently.

    Trees & Graphsbfsgridsimulationqueue
  • Dynamic ProgrammingMediumAuto-graded
    Grid Traversal with Sequential Waypoints

    Tests dynamic programming on a grid with diagonal moves, tracking reachable states column-by-column while enforcing waypoint visitation order.

    Dynamic Programminggriddpspace-optimization
  • StringsEasyAuto-graded
    Maximum Length of Equally Frequent Character Substring

    Find the longest contiguous substring where all distinct characters appear with identical frequency.

    Stringssliding-windowhash-mapfrequency-counting
  • Trees & GraphsEasyAuto-graded
    Tree Height Levels: Bottom-Up Node Grouping

    Compute each node's height in a rooted tree and group nodes by height, testing tree traversal and bottom-up computation.

    Trees & Graphstreesbfsheightbottom-up
  • Linked ListsEasyAuto-graded
    Weave Two Halves of a Linked List

    Tests pointer manipulation intuition by reordering a singly linked list represented as an array, interleaving nodes from the front and back halves.

    Linked Listslinked liststwo pointersarray manipulation
  • Greedy & IntervalsMediumAuto-graded
    Maximum Sum Window Over Sparse Value Ranges

    Find the largest sum of k consecutive positions when values are defined by disjoint intervals on an infinite line.

    Greedy & Intervalssliding-windowtwo-pointersintervalsmodular-arithmetic
  • Trees & GraphsHardAuto-graded
    Calculate Grid Infection Time

    Tests breadth-first search from multiple sources to model time-based propagation in a grid with obstacles and unreachable regions.

    Trees & Graphsbfsgridmulti-sourcegraph-traversal
  • Math & Bit ManipulationEasyAuto-graded
    Average Arc Length Containing a Fixed Point on a Circle

    Tests understanding of geometric probability, the inspection paradox, and computing expectations when a random partition is observed from a fixed viewpoint.

    Math & Bit Manipulationprobabilitygeometryexpectationinspection-paradox
  • SQL & DataMediumAuto-graded
    Find Most Similar Item Collections

    Tests set operations, pairwise comparison, and tie-breaking logic to identify the pair of collections with maximum item overlap.

    SQL & Datasetssimilarity-metricsdata-manipulation
  • Heaps, Sorting & SearchMediumAuto-graded
    Win Rate Between Two Weighted Dice

    Tests whether a candidate can count strict-win outcome pairs across two multi-faced dice efficiently using sorting and binary search instead of a brute-force double loop.

    Heaps, Sorting & Searchbinary-searchsortingprobabilityarrays
  • Arrays & HashingMediumAuto-graded
    Merge Sorted Quadratic Outputs in Linear Time

    Evaluate a quadratic polynomial on a sorted array and return sorted results without using O(n log n) sorting

    Arrays & Hashingtwo-pointerssortingmath
  • Arrays & HashingMediumAuto-graded
    Find Dictionary with Extreme Field Value

    Tests your ability to scan a collection of sparse dictionaries and retrieve the one with the minimum or maximum value for a specified field.

    Arrays & Hashingdictionariesfilteringiteration
  • Math & Bit ManipulationMediumAuto-graded
    Positive Divisors of N² via Prime Factorization of N

    Tests whether a candidate can reduce a unit-fraction equation to a divisor-counting problem using algebraic factoring and number theory.

    Math & Bit Manipulationnumber-theorydivisorsprime-factorization
  • Heaps, Sorting & SearchMediumAuto-graded
    Find Leftmost Position Meeting Threshold

    Tests understanding of lower-bound binary search with correct boundary handling and duplicate treatment.

    Heaps, Sorting & Searchbinary-searchboundariesduplicates
  • Arrays & HashingMediumAuto-graded
    Find Optimal Discount from Multiple Promotion Types

    Tests ability to compare multiple discount strategies with different application rules and select the best outcome while handling edge cases like empty inputs and clamping.

    Arrays & Hashingsimulationgreedymath
  • Arrays & HashingMediumAuto-graded
    Build Alternating Color Bands for a Trail Map API

    Tests iteration logic for splitting a sequence into overlapping chunks with alternating properties

    Arrays & Hashingiterationchunkingapi-design
  • Dynamic ProgrammingHardAuto-graded
    Best Profit from One or Two Stock Transactions

    Tests dynamic programming and greedy strategies to compute optimal profit from array-based buy/sell scheduling with transaction limits.

    Dynamic Programmingarraysgreedystate-machineoptimization
  • Dynamic ProgrammingMediumAuto-graded
    Optimize Work Schedule with Limited Day Swaps

    Tests dynamic programming with state tracking to maximize earnings from daily pay and streak bonuses while converting limited off-days to work-days.

    Dynamic Programmingdynamic-programmingstate-machineoptimization
  • Data Structure DesignMediumAuto-graded
    Reverse Trie for Ending Pattern Queries

    Tests understanding of tries and the insight that suffix matching becomes prefix matching when strings are reversed.

    Data Structure Designtriestring-matchingdata-structures
  • Data Structure DesignMediumAuto-graded
    In-Memory Store with Nested Transaction Support

    Tests your ability to implement layered state management with nested scopes, tombstone deletion tracking, and atomic commit/rollback semantics.

    Data Structure Designhash-tablestackstate-management