Katkat

practice a little every day, paws crossed ♡

Coding & Algorithms Interview Questions

Practice 9403 coding, system design and machine learning questions from 546 companies, sorted by role, topic and interview round. Every question has step-by-step hints, a code runner that supports 8 languages and an AI mentor; members also get the full solution walkthrough.

9403
Questions
546
Companies
11
Topics
8
Languages

Showing 1–30 of 37 results

  • Akuna CapitalMediumSoftware Engineer
    Design two-user communications handler with exceptions

    This question evaluates object-oriented design, state management, and custom exception handling skills for enforcing a single active communication pair and related invariants between two users.

    Coding & AlgorithmsHR Screen
  • AmazonHardSoftware Engineer
    Build an LRU Cache with a Hash Map and Linked List

    This problem tests your ability to design a cache with O(1) time complexity for both get and put operations by combining a hash map with a doubly linked list.

    Coding & AlgorithmsHR ScreenHash MapLinked ListDesign
  • AmazonHardSoftware Engineer
    Return the Maximum of Every Sliding Window

    This problem tests your ability to maintain a sliding window maximum using an efficient data structure like a deque to achieve linear time complexity.

    Coding & AlgorithmsHR ScreenArraysSliding WindowDeque
  • ByteDanceHardBackend Engineer
    Solve Bracket Matching and Tree Width

    This problem tests string manipulation and tree traversal techniques by requiring the validation of complex bracket sequences and the calculation of the maximum horizontal distance between nodes at the same level of a binary tree.

    Coding & AlgorithmsHR ScreenStacksBFSTrees
  • Capital OneMediumSoftware Engineer
    Grid State After a Given Number of Days of Spoilage Spreading to Neighbors

    A grid holds empty cells, fresh items and spoiled items, and each day spoilage spreads from every spoiled item to its edge-adjacent fresh neighbors. Given the grid and a number of days that may be very large, return the grid after exactly that many days. It tests simultaneous multi-source spreading, day-by-day timing, and unreachable cells.

    Coding & AlgorithmsHR Screen
  • Capital OneMediumMachine Learning Engineer
    Maximize grid-path expression and count sawtooth subarrays

    This multi-part question evaluates dynamic programming and state management for constrained grid traversal with left-to-right expression evaluation, alongside parity-based array analysis and combinatorial counting of contiguous subarrays.

    Coding & AlgorithmsHR Screen
  • Capital OneMediumSoftware Engineer
    Top Two Teams by Points, Then Goal Difference, Then Goals Scored

    Given parallel arrays of wins, draws, goals scored and goals conceded for each team, compute points as three per win plus one per draw and return the indices of the top two teams. Ties are broken by goal difference, then goals scored, then index, testing multi-key comparison and careful tie handling.

    Coding & AlgorithmsHR Screen
  • CitadelMediumSoftware Engineer
    Maximize Earnings by Converting Days Off

    Tests dynamic programming and state tracking to maximize daily earnings and consecutive work streak bonuses under a budget of schedule changes.

    Coding & AlgorithmsHR Screendynamic-programmingalgorithmssliding-window
  • CitadelMediumSoftware Engineer
    Minimize Changes to Make Every Password Block Palindromic

    Tests string manipulation and two-pointer techniques to determine the minimum character replacements needed to make independent fixed-length blocks palindromic.

    Coding & AlgorithmsHR Screenstringstwo-pointersgreedy
  • CoinbaseMediumData Scientist
    Detect sequence rule and repair anomaly

    This question evaluates a candidate's skill in sequence pattern recognition, algorithm design, complexity analysis, and robust integer arithmetic by requiring inference among arithmetic, alternating-difference, geometric, and Fibonacci-plus-constant models while tolerating at most one corrupted term under O(n) time and O(1) extra space constraints.

    Coding & AlgorithmsHR Screen
  • DRWMediumSoftware Engineer
    Largest Number From a 1-and-2 Digit String With Even Counts of Each Digit

    Given a string of 1s and 2s that represents a positive integer, delete characters so the remaining counts of both digits are even, keeping the original order, and return the largest number that can remain. The problem tests careful case analysis of which digit occurrences to remove and efficient string handling for inputs up to 200,000 characters.

    Coding & AlgorithmsHR Screen
  • DRWHardSoftware Engineer
    Maximize a Digit Subsequence with Even Counts of Ones and Twos

    Find the lexicographically/numerically largest subsequence of a string of '1's and '2's containing an even number of both digits in linear time.

    Coding & AlgorithmsHR Screengreedystringssubsequences
  • DatabricksMediumSoftware Engineer
    Solve graph path, interval deletion, and robbery

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Solve graph path, interval deletion, and robbery states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsHR Screen
  • Hudson River TradingEasySoftware Engineer
    Maximize Item Counts Under Suffix Budget Queries

    Determine the maximum number of items that can be purchased from a suffix of an item array within a given budget for multiple independent queries.

    Coding & AlgorithmsHR Screengreedysortingbinary-search
  • ImbueHardSoftware Engineer
    Max Score of an Alternating Left-Right Walk Over a Row of Signed Cells

    A token walks a row of up to 50 signed cells, alternating right and left moves, and each move adds the sum of the cells it covers while the score must never drop below zero. Find the best score within up to 400 million moves, testing state design, the non-negative score constraint, and speed when the move count is huge.

    Coding & AlgorithmsHR Screen
  • InstacartMediumSoftware Engineer
    Evaluate arithmetic expression using DFS

    This question evaluates a candidate's understanding of expression parsing and evaluation using depth-first traversal, covering competencies in recursive descent or stack-based DFS, operator precedence, unary operators, and 64-bit integer division semantics with truncation toward zero.

    Coding & AlgorithmsHR Screen
  • InstacartMediumSoftware Engineer
    Optimize file reading and expression DFS

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Optimize file reading and expression DFS states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsHR Screen
  • InstacartMediumSoftware Engineer
    Optimize file reads for password validation

    This question evaluates proficiency in on-disk file I/O, streaming algorithms, offline indexing for sublinear lookups, and system-level performance considerations for validating credentials in large files.

    Coding & AlgorithmsHR Screen
  • MetaMediumSoftware Engineer
    Solve array merge and tree flattening problems

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Solve array merge and tree flattening problems states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsHR Screen
  • MetaEasySoftware Engineer
    Solve four OA coding problems

    This set of coding tasks evaluates fundamental skills in array manipulation, graph traversal, greedy strategy, and sequence analysis.

    Coding & AlgorithmsHR ScreenArraysGreedyGraphs
  • MicrosoftMediumMachine Learning Engineer
    Find the Lowest Common Ancestor in a Binary Search Tree

    This problem tests the ability to leverage the Binary Search Tree (BST) property to efficiently locate the Lowest Common Ancestor (LCA) of two nodes.

    Coding & AlgorithmsHR ScreenBSTTreesRecursion
  • MicrosoftMediumMachine Learning Engineer
    Find the Lowest Common Ancestor in a Binary Tree

    This problem tests tree traversal techniques and recursion logic to identify the deepest node that is an ancestor to two specified nodes in an arbitrary binary tree.

    Coding & AlgorithmsHR ScreenTreesRecursionDFS
  • MicrosoftMediumMachine Learning Engineer
    Implement SFT Sample Packing

    This problem tests your ability to efficiently pack variable-length sequences into fixed-length blocks for training, ensuring padding tokens do not influence the loss calculation.

    Coding & AlgorithmsHR ScreenNLPData PreprocessingArrays
  • Morgan StanleyMediumData Scientist
    Implement Factorial and Squares

    A Morgan Stanley data scientist HR-screen live-coding warm-up: implement Python `factorial(n)` (iteratively, then explain the recursive version) and `squares(n)` returning the squares of the first n integers. Evaluates clean Python, the iteration-vs-recursion trade-off, time and space complexity analysis, input validation, and edge cases like n = 0 and negative input.

    Coding & AlgorithmsHR Screen
  • NVIDIAHardData Scientist
    Design and explain robust web APIs for ML inference

    This question evaluates a candidate's proficiency in designing HTTP REST APIs for ML inference, including API endpoints, versioning, idempotency, request/response schemas, authentication/authorization, rate limiting, observability, and backward-compatibility policies, and it falls under the Coding & Algorithms domain for a data scientist role.

    Coding & AlgorithmsHR Screen
  • NVIDIAHardData Scientist
    Implement CUDA-tiled matrix multiplication and explain architecture

    This question evaluates a candidate's competency in CUDA GPU programming, parallel algorithms, and performance engineering for FP32 matrix multiplication, covering tiling strategies, memory hierarchy (global/shared/register), synchronization, numerical precision, and occupancy/resource analysis.

    Coding & AlgorithmsHR Screen
  • NVIDIAHardData Scientist
    Optimize CUDA GEMM with tiling and coalescing

    This question evaluates proficiency in GPU programming and performance optimization, assessing understanding of the CUDA execution model, memory hierarchy and bank conflicts, occupancy limits, and practical kernel design concerns for single-precision GEMM including tiling, coalescing, vectorized memory accesses and benchmarking.

    Coding & AlgorithmsHR Screen
  • NVIDIAHardData Scientist
    Reverse linked lists, including k-group

    This question evaluates understanding of linked list manipulation including pointer operations, in-place reversal techniques, recursion and stack-depth considerations, cycle detection, and time/space complexity analysis.

    Coding & AlgorithmsHR Screen
  • OpenAIMediumSoftware Engineer
    Implement Three Research Coding Tasks

    This problem tests fundamental understanding of numerical stability in probability, memory-efficient buffering, and greedy combinatorial optimization.

    Coding & AlgorithmsHR ScreenNumerical StabilityDynamic ProgrammingStreaming Algorithms
  • RipplingHardSoftware Engineer
    Solve listed algorithm problems

    This problem tests your ability to model exchange rates as a graph and use path-finding algorithms to detect profitable arbitrage opportunities.

    Coding & AlgorithmsHR ScreenGraphsShortest PathBellman-Ford