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 3241–3270 of 3276 results

  • eBayMediumSoftware Engineer
    Find the Longest Palindromic Substring

    Implement an algorithm to find the longest palindromic substring in a given string, breaking ties by selecting the earliest occurrence and properly handling empty inputs.

    Coding & AlgorithmsTechnical Screenstringstwo-pointersdynamic-programming
  • eBayHardSoftware Engineer
    Find top co-viewed products

    This question evaluates algorithmic problem-solving and implementation skills in the Coding & Algorithms domain, including frequency aggregation, ordering with tie-breakers, and efficient data-structure use for session-based recommendation counting.

    Coding & AlgorithmsOnsite
  • eBayMediumSoftware Engineer
    Implement an In-Memory File System

    This problem tests proficiency with hierarchical data structures (trees/tries) and object-oriented design by requiring the implementation of an in-memory file system with file/directory management and path resolution.

    Coding & AlgorithmsOnline AssessmentTreesTrieDesign
  • eBayMediumSoftware Engineer
    Implement list and grid transformation tasks

    This problem tests your ability to simulate state-dependent transitions on a 2D grid and your skill in repartitioning data based on specific grouping constraints.

    Coding & AlgorithmsTechnical ScreenArraysSimulationSorting
  • eBayEasySoftware Engineer
    Length of the Longest Contiguous Subarray Summing to a Target

    Given an integer array that may contain negative numbers and a target k, return the length of the longest contiguous subarray whose sum equals k, or 0 when none exists. Tests reasoning about subarray sums with mixed signs and handling large inputs efficiently.

    Coding & AlgorithmsTechnical Screen
  • eBayMediumSoftware Engineer
    Pass functions and analyze basic data structures

    This question evaluates proficiency with higher-order functions, passing functions or delegates, closures, and reasoning about side effects, alongside the ability to analyze fundamental data structures and their performance characteristics.

    Coding & AlgorithmsOnsite
  • eBayMediumSoftware Engineer
    Rebuild a Binary Tree from Two Traversals and Serialize It Level by Level

    Given the preorder and inorder traversals of a binary tree with distinct values, rebuild the tree and return its level-order serialization, with empty slots marked as None and trailing ones removed. It tests understanding of traversal orders, careful index bookkeeping and an efficient solution for trees with thousands of nodes, including fully skewed ones.

    Coding & AlgorithmsTechnical Screen
  • eBayMediumSoftware Engineer
    Return the K Smallest Values from Sorted Arrays

    Tests ability to efficiently merge multiple sorted streams to extract the k smallest elements using a min-heap or frontier-based approach. Evaluates handling of empty arrays, duplicates, and computational complexity dependent on the number of arrays rather than total elements.

    Coding & AlgorithmsTechnical ScreenHeapPriority QueueMerge Sort
  • eBayMediumSoftware Engineer
    Search a Rotated Sorted Array in One Binary-Search Pass

    Implement a single-pass binary search to locate a target value in a rotated strictly increasing array in logarithmic time and constant auxiliary space.

    Coding & AlgorithmsTechnical Screenbinary-searcharraysdivide-and-conquer
  • eBayMediumSoftware Engineer
    Solve Dependency, Prefix, and Cache Problems

    This set of problems evaluates graph algorithms for dependency and cycle detection, efficient data structure design for prefix-based word storage, and cache eviction policy implementation, assessing skills in algorithmic analysis, data structures, and time/space complexity within the Coding & Algorithms domain.

    Coding & AlgorithmsOnsite
  • eBayMediumSoftware Engineer
    Wildcard Dictionary Matching

    This problem tests your ability to implement a pattern-matching algorithm that supports variable-length wildcards using recursion with memoization or dynamic programming.

    Coding & AlgorithmsTechnical ScreenRecursionDynamic ProgrammingString Matching
  • xAIMediumSoftware Engineer
    Compute dasher pay from order events

    This question evaluates a candidate's ability to process time-based event streams, manage overlapping active intervals, and compute aggregate payouts under concurrency constraints.

    Coding & AlgorithmsTechnical Screen
  • xAIMediumSoftware Engineer
    Compute total active time per Twitter Space

    This problem tests your ability to process chronological event streams to calculate overlapping or continuous active intervals and aggregate durations per category.

    Coding & AlgorithmsOnsiteSortingHash MapData Processing
  • xAIHardMachine Learning Engineer
    Constant-Time Insert, Remove, and Uniform Random Sampling

    This question evaluates the ability to design a data structure that supports constant-time insertions, removals, and uniform random sampling, testing concepts such as hashing, indexed storage, and randomized selection within the coding and algorithms domain.

    Coding & AlgorithmsOnsite
  • xAIMediumSoftware Engineer
    Contrast processes and threads

    This question evaluates understanding of operating system and concurrency fundamentals—specifically differences between processes and threads including memory isolation, resource ownership, scheduling, context-switch costs, inter-process communication versus in-process synchronization, failure isolation, and security.

    Coding & AlgorithmsTechnical Screen
  • xAIMediumMachine Learning Engineer
    Design O(1) random-sampling set

    This question evaluates a candidate's competency in data-structure design, randomized algorithms, and algorithmic complexity analysis within the Coding & Algorithms domain, with a focus on achieving expected O(1) operations for insert, remove, and uniform sampling.

    Coding & AlgorithmsTechnical Screen
  • xAIMediumSoftware Engineer
    Design a Least Frequently Used (LFU) Cache with O(1) Operations

    This question evaluates understanding of data structures and algorithm design for implementing a Least Frequently Used (LFU) cache with O(1) get and put operations, emphasizing frequency tracking and least-recently-used tie-breaking.

    Coding & AlgorithmsOnsite
  • xAIMediumSoftware Engineer
    Design a Recoverable Iterator

    Design a forward-only iterator wrapper that supports saving and restoring cursor state via checkpoints, testing buffering strategies and memory management.

    Coding & AlgorithmsTechnical Screendesigndata-structuresiterators
  • xAIMediumSoftware Engineer
    Explain and Implement Strings

    This question evaluates understanding of string data structures, memory layout, ownership and move semantics in Rust, and algorithmic complexity related to copying and performance.

    Coding & AlgorithmsTechnical Screen
  • xAIMediumSoftware Engineer
    Explain arrays and memory layout

    This question evaluates understanding of arrays, their contiguous memory representation including element size, alignment and indexing arithmetic, along with time-complexity analysis for access, insertion and deletion and implications for cache locality.

    Coding & AlgorithmsTechnical Screen
  • xAIMediumSoftware Engineer
    Explain strings, moves, and concurrency

    This question evaluates understanding of string data structures, ownership and move semantics (including Rust-specific move behavior), and concurrency models such as threads versus asynchronous coroutines, testing competencies in memory management, performance analysis, and concurrent programming.

    Coding & AlgorithmsTechnical Screen
  • xAIHardSoftware Engineer
    Find kth element and sliding-window kth in stream

    This problem tests your ability to maintain order statistics in a streaming context, moving from a static selection problem to an efficient sliding-window implementation.

    Coding & AlgorithmsTechnical ScreenQuickSelectHeapSliding Window
  • xAIMediumSoftware Engineer
    Flatten and unflatten nested Python structures

    This problem tests recursion, type introspection, and data structure manipulation by requiring the implementation of flattening and reconstruction logic for arbitrarily nested lists and dictionaries.

    Coding & AlgorithmsTechnical ScreenRecursionData StructuresSerialization
  • xAIHardMachine Learning Engineer
    Greedy Longest-Match Tokenizer for an LLM Data Pipeline

    This question evaluates understanding of string-processing and greedy maximal-munch tokenization, as well as competency in designing efficient prefix-matching data structures and handling large-scale text preprocessing for LLM pipelines.

    Coding & AlgorithmsOnsite
  • xAIHardMachine Learning Engineer
    Implement Distributed Matrix Multiplication

    This problem tests your ability to design a distributed matrix multiplication algorithm by partitioning large matrices across multiple worker nodes to minimize communication overhead.

    Coding & AlgorithmsTechnical ScreenDistributed SystemsLinear AlgebraParallel Computing
  • xAIMediumSoftware Engineer
    Implement a Radix Cache for Integer Sequences

    This question evaluates understanding of radix trees (prefix-compressed tries), sequence-oriented trie manipulation, and the maintenance of invariants like distinct branching and maximal compression, and belongs to the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • xAIMediumSoftware Engineer
    Implement a parallelized sort

    This problem tests your ability to implement a parallelized version of Merge Sort using threads or a thread pool, focusing on partitioning, synchronization, and managing recursion depth.

    Coding & AlgorithmsOnsiteAlgorithmsConcurrencyMerge Sort
  • xAIMediumMachine Learning Engineer
    Implement dynamic batching for token decoding

    This question evaluates dynamic batching, per-request state management, and sequence-decoding correctness for language-model inference, including handling stop conditions, max-token limits, and maintaining a correct slot-to-request mapping.

    Coding & AlgorithmsOnsite
  • xAIMediumData Engineer
    Implement two string utility functions

    This question evaluates proficiency in string manipulation and text processing, including character counting, tokenization by spaces, case-sensitive comparisons, and preserving original word order.

    Coding & AlgorithmsTechnical Screen
  • xAIEasySoftware Engineer
    In-Memory Key-Value Database with Nested Transactions

    This question evaluates understanding of in-memory data structures, transactional semantics (including nested transactions), and algorithmic complexity for implementing a key-value store that supports efficient GET/SET and rollback/commit operations.

    Coding & AlgorithmsOnsite