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 541–570 of 1080 results

  • LyftMediumSoftware Engineer
    Minimum Window Substring with Repeated Required Characters

    Tests the sliding window technique and frequency counting to find the shortest substring containing all required characters with their exact multiplicities in linear time.

    Coding & AlgorithmsOnsiteSliding WindowTwo PointersHash Table
  • LyftMediumData Scientist
    Optimize Driver Repositioning for Minimal Pickup Time

    This question evaluates spatial algorithms and real-time optimization for ride dispatch together with interval scheduling and capacity planning competencies, covering skills in computational geometry, routing, demand forecasting, and temporal overlap reasoning.

    Coding & AlgorithmsOnsite
  • LyftEasySoftware Engineer
    Reconstruct a BST from Preorder Traversal

    Reconstruct the exact binary search tree represented by a preorder traversal of unique integers. Handle empty and completely skewed inputs at scale while preserving the intended tree rather than balancing it.

    Coding & AlgorithmsOnsite
  • LyftMediumSoftware Engineer
    Rotting Oranges

    Compute how many simultaneous spread steps are needed to rot every reachable orange using multi-source grid traversal.

    Coding & AlgorithmsOnsite
  • LyftMediumSoftware Engineer
    Solve grid compromise spread with BFS

    This question evaluates proficiency in graph traversal and grid-based simulation, specifically multi-source breadth-first search, state propagation modeling, and algorithmic complexity analysis within the Coding & Algorithms domain, emphasizing practical application of implementation and reasoning.

    Coding & AlgorithmsOnsite
  • LyftMediumSoftware Engineer
    Solve substring and worker assignment

    This pair of problems evaluates competencies in string processing and multiplicity handling as well as scheduling and resource-allocation for interval tasks, testing the ability to choose and apply appropriate data structures while managing time and space complexity.

    Coding & AlgorithmsOnsite
  • Marshall WaceMediumSoftware Engineer
    Compute max events in any 60-second window

    This question evaluates understanding of timestamp and array processing, sliding-window or two-pointer techniques, and the ability to analyze time and space complexity when counting events within fixed-size intervals.

    Coding & AlgorithmsOnsite
  • MathWorksMediumSoftware Engineer
    Minimize reduction cost and validate equal-sum pairs

    This problem tests your ability to use greedy strategies with priority queues to minimize reduction costs and use hash-based frequency mapping to identify valid pairs that satisfy specific sum conditions.

    Coding & AlgorithmsOnsiteGreedyMin-HeapHash Map
  • MavenclinicMediumSoftware Engineer
    Solve two interview coding problems

    This problem tests your ability to handle currency conversion using graph pathfinding (multiplicative weights) and implement a custom pagination algorithm that balances item distribution while respecting original ordering.

    Coding & AlgorithmsOnsiteGraphsShortest PathGreedy
  • MercorMediumMachine Learning Engineer
    Check Whether Every Parcel Finds a Locker With Forward Overflow

    Parcels arrive one at a time for a bank of numbered lockers, each requesting a preferred locker and overflowing to the next higher-numbered empty one if it's taken. Decide whether every parcel finds a locker. Tests precise rule-following and an efficient alternative to simulating forward scans one slot at a time.

    Coding & AlgorithmsOnsiteunion-findsimulationarrays
  • MercorMediumSoftware Engineer
    Currency Exchange Rate Between Two Currencies via Chained Conversions

    Given a list of pairwise currency exchange rates such as USD to GBP at 0.77, compute the rate from a source currency to a target currency, converting through intermediate currencies and using rates in reverse where needed. It tests reasoning about chained conversions, unknown or unreachable currencies, and a clear time and space complexity analysis.

    Coding & AlgorithmsOnsite
  • MercorMediumMachine Learning Engineer
    Implement a Referral Network

    Design and implement an in-memory referral network as a directed acyclic graph (DAG) supporting cycle-safe edge insertion, depth-bounded reachability queries, and expected reward computation under geometric decay.

    Coding & AlgorithmsOnsiteGraph AlgorithmsDAGBFS
  • MetaHardSoftware Engineer
    Answer Repeated Range Aggregate Queries on a Static BST

    Preprocess a sorted array derived from a static BST to answer many inclusive range queries. Use binary-search boundaries and wide prefix sums to return both the sum and count for each range without rescanning the tree.

    Coding & AlgorithmsOnsite
  • MetaMediumSoftware Engineer
    Answer four string/array/battery coding questions

    This set of four problems evaluates algorithmic competencies including ASCII string processing and character classification, array transformation and operation-count reasoning, cost-minimization for enforcing monotonicity under only-increase constraints, and time-based simulation of resource scheduling with recharge cycles.

    Coding & AlgorithmsOnsite
  • MetaMediumSoftware Engineer
    Build a FastAPI summarization service

    This question evaluates web API development and backend engineering competencies, including FastAPI usage, Python type hints, Pydantic-based request/response validation, error handling, in-memory state management, and modular router/service/model layering, and it belongs to the Coding & Algorithms category with a focus on backend web service and API design. It is commonly asked to assess practical ability to deliver production-ready REST endpoints with proper validation and error handling under constrained resources, and the level of abstraction required is primarily practical implementation with attention to architectural design.

    Coding & AlgorithmsOnsite
  • MetaHardMachine Learning Engineer
    Build a Friend Recommender

    This problem tests your ability to implement a graph-based recommendation algorithm using common neighbors and popularity constraints to rank potential connections.

    Coding & AlgorithmsOnsiteGraphSortingRecommendation System
  • MetaMediumSoftware Engineer
    Canonicalize an Absolute Unix-Style Path With Dot and Double-Dot Segments

    Convert an absolute Unix-style file path into its canonical form by collapsing repeated slashes, dropping single-dot segments, resolving double-dot segments against the parent directory, and treating other dot sequences as ordinary names. It tests careful string parsing and edge cases such as the root directory.

    Coding & AlgorithmsOnsite
  • MetaHardSoftware Engineer
    Check Whether Deleting at Most K Characters Can Form a Palindrome

    Determine whether a string can be transformed into a palindrome by removing at most k characters. Tests dynamic programming, palindrome properties, and recursive search with branch bounding.

    Coding & AlgorithmsOnsiteDynamic ProgrammingTwo PointersString
  • MetaMediumSoftware Engineer
    Choose the Cheapest Round Trip

    This problem tests the ability to optimize a two-step decision process by maintaining track of the best previous state, requiring a linear scan approach.

    Coding & AlgorithmsOnsiteArraysGreedyOptimization
  • MetaHardSoftware Engineer
    Choose the Longest Set of Words with No Repeated Characters

    Tests bitmask representation, backtracking with pruning, and combinatorial optimization under character-uniqueness constraints.

    Coding & AlgorithmsOnsitebitmaskbacktrackingdepth-first-search
  • MetaMediumSoftware Engineer
    Combine Many Sorted Integer Arrays into One Non-Decreasing Array

    A coding question asking you to merge many integer arrays, each already sorted in non-decreasing order, into a single sorted array that keeps every duplicate value. It tests multi-way merging, efficiency as the number of input arrays grows, and edge cases such as empty inputs and arrays of different lengths.

    Coding & AlgorithmsOnsite
  • MetaMediumSoftware Engineer
    Compute BST range sum

    This question evaluates understanding of binary search tree properties, traversal techniques, and the ability to implement both recursive and iterative algorithms while reasoning about time and space complexity.

    Coding & AlgorithmsOnsite
  • MetaMediumSoftware Engineer
    Compute Stock Profit with One or Unlimited Transactions

    Compute maximum stock profit for both one transaction and unlimited nonoverlapping transactions in linear time, returning zero when no positive trade is available.

    Coding & AlgorithmsOnsite
  • MetaHardSoftware Engineer
    Compute the Dot Product of Sparse Vectors

    Compute the dot product of two sparse vectors stored as sorted index-value pairs without expanding them. A two-pointer traversal should visit only nonzero entries, multiply matching indices, and accumulate safely in a wide integer type.

    Coding & AlgorithmsOnsite
  • MetaMediumMachine Learning Engineer
    Compute the next lexicographic permutation

    This problem tests your ability to manipulate array elements in-place to find the next lexicographically ordered sequence, focusing on understanding the properties of permutations.

    Coding & AlgorithmsOnsiteArraysPermutationsTwo Pointers
  • MetaMediumSoftware Engineer
    Compute unmatched parentheses length

    This problem tests your ability to use stack-based logic to track balanced sequences and identify the length of characters that remain unmatched after processing all valid pairs.

    Coding & AlgorithmsOnsiteStringStackGreedy
  • MetaMediumSoftware Engineer
    Count Distinct Values in a Sorted Array When K Is Small

    Count distinct values in a sorted array efficiently when the number of unique values is much smaller than the array length. The challenge tests adapting complexity to output diversity rather than raw length, meeting an O(k log n) target with constant auxiliary space, and handling empty or uniform arrays.

    Coding & AlgorithmsOnsite
  • MetaMediumSoftware Engineer
    Count Subarrays with a Target Sum

    Tests the ability to use prefix sums and hash tables to count contiguous subarrays summing to a target in linear time, handling negative values and zeros.

    Coding & AlgorithmsOnsitearraysprefix-sumhash-table
  • MetaHardSoftware Engineer
    Count three-digit numbers with distinct digits

    This problem tests your ability to count numbers satisfying digit-based constraints within a specific range using combinatorial logic or efficient iteration.

    Coding & AlgorithmsOnsiteMathCombinatoricsImplementation
  • MetaMediumMachine Learning Engineer
    Debug and optimize a card-drawing strategy

    This problem tests your ability to simulate card-drawing probabilities, debug flawed logic in iterative selection strategies, and optimize performance for repeated simulations.

    Coding & AlgorithmsOnsiteAlgorithmsSimulationProbability