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 1621–1650 of 3276 results

  • MetaMediumSoftware Engineer
    Compute interval mode, BST range sum, exclusive time

    This multipart question evaluates proficiency in interval coverage and frequency analysis, binary search tree range-sum queries with preprocessing for repeated queries, and exclusive-time computation from call logs, covering concepts such as event counting/sweep-line, BST traversal and augmentation, and nested-call time accounting.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Compute left and right views once

    This question evaluates understanding of binary tree traversal, depth tracking, and view computation for left and right perspectives, plus the ability to implement a concurrent single-pass traversal while handling edge cases such as empty trees and duplicate keys.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Compute longest increasing path in a matrix

    Compute longest increasing path in a matrix evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Compute longest rising path in a grid

    This question evaluates mastery of graph traversal, dynamic programming, and complexity analysis for computing longest increasing paths in a matrix, focusing on algorithmic correctness and efficient use of time and space.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Compute max profit from single stock trade

    This question evaluates a candidate's ability to design efficient array algorithms, reason about time and space complexity constraints, and handle edge cases related to single-transaction profit calculation.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Compute nested depth-weighted sum

    This question evaluates understanding of tree-like nested data structures, traversal strategies (recursive DFS and iterative approaches), handling of edge cases such as empty lists and negative integers, and algorithmic reasoning about time and space complexity within the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumMachine Learning Engineer
    Compute sliding-window medians

    This question evaluates proficiency in designing and analyzing efficient sliding-window algorithms and data structures for computing running medians, including correct handling of duplicates, deletions, and the convention for defining the median when k is even.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Compute sparse dot product and count islands

    This question evaluates competency in designing efficient algorithms for sparse data representations and for identifying connected components in grids, testing skills in handling large inputs, memory-efficient representations, and traversal/graph concepts.

    Coding & AlgorithmsTechnical Screen
  • 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
    Compute vertical order of a BST

    This question evaluates understanding of binary tree traversals and coordinate-based ordering, including tie-breaking by breadth-first visitation order, plus competency in algorithmic time and space complexity analysis and strategies for handling deep recursion and streaming large inputs.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Compute weighted sum of nested lists

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Compute weighted sum of nested lists states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Convert BST to sorted doubly list

    This question evaluates understanding of binary search tree properties, in-order traversal, in-place pointer manipulation, and algorithmic complexity when converting tree nodes into a sorted doubly linked list.

    Coding & AlgorithmsTechnical Screen
  • 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
  • MetaMediumSoftware Engineer
    Count palindrome substrings in a string

    This question evaluates proficiency in string algorithms, algorithmic design, and complexity analysis by targeting palindromic substring counting, string manipulation, and conceptual linear-time techniques.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Count subarrays equal to target

    This problem tests your ability to use a hash map to track prefix sums, allowing for an efficient solution to a subarray counting problem.

    Coding & AlgorithmsTechnical ScreenArrayHash MapPrefix Sum
  • MetaMediumSoftware Engineer
    Count subarrays summing to target

    This question evaluates understanding of prefix-sum concepts, use of linear-time data structures, and competence in handling negative numbers and edge cases such as zero targets and empty prefixes.

    Coding & AlgorithmsTechnical Screen
  • 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
  • MetaMediumSoftware Engineer
    Decide palindrome within k deletions

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Decide palindrome within k deletions states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumMachine Learning Engineer
    Deep copy a linked list with random pointers

    This problem tests your ability to manipulate complex pointer structures and maintain object identity across a deep copy operation in a non-linear linked list.

    Coding & AlgorithmsTechnical ScreenLinked ListHash TablePointers
  • MetaMediumSoftware Engineer
    Design LCA and find K closest points

    This question evaluates understanding of tree algorithms (LCA using parent pointers) and selection algorithms (sorting, max-heap, quickselect), emphasizing data structures, algorithmic correctness, and time/space complexity within the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Design a bank system with scheduled transfers

    This question evaluates object-oriented design and stateful system skills, including time-ordered event processing, scheduling and cancellation semantics, balance accounting, and top-k aggregation using appropriate data structures.

    Coding & AlgorithmsOnline Assessment
  • MetaMediumSoftware Engineer
    Design an in-memory cloud file system

    This question evaluates understanding of object-oriented design, stateful data structures, and resource management including user quotas, ownership semantics, and file metadata operations.

    Coding & AlgorithmsOnline Assessment
  • MetaMediumSoftware Engineer
    Design an in-memory database with TTL and history

    This question evaluates understanding of time-versioned in-memory key–field–value stores, covering TTL-based expiration, historical reads, atomic compare-and-set/delete semantics, efficient scan/scan-by-prefix operations, and time/space complexity analysis, and it belongs to the Coding & Algorithms domain.

    Coding & AlgorithmsOnline Assessment
  • MetaMediumSoftware Engineer
    Design prefix-sum function and max stack

    This question evaluates understanding of prefix-sum precomputation for constant-time range queries and the design of a max-enabled stack, focusing on data structure design, algorithmic complexity, and space-time trade-offs.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumData Scientist
    Design robust group size limiting for calls

    This question evaluates distributed systems design, concurrency control, admission-control algorithms, and scalability under real-time and race-condition constraints.

    Coding & AlgorithmsTechnical Screen
  • MetaMediumSoftware Engineer
    Design structure for top-K frequent elements

    This question evaluates a candidate's competency in algorithm and data-structure design, frequency counting and streaming/approximation techniques, and the ability to reason about time/space complexity and workload-driven trade-offs.

    Coding & AlgorithmsOnsite