Interview questions
Find a company or topic. Read the sources, then practice.
Loading the question library…
Find a company or topic. Read the sources, then practice.
Loading the question library…
Showing 651–675
Companies: Anthropic
Concurrency · File & Media Storage
Last reported Apr 2026
Companies: TikTok
Last reported Apr 2026
Companies: OpenAI
Simulation & State Machines
Last reported Apr 2026
Given two sorted lists of non-overlapping intervals (A and B), return a new sorted list representing the union of both interval lists. Any overlapping or…
Companies: Meta
Last reported Apr 2026
Given signed integers for asteroid sizes and directions, determine which asteroids remain after sequential collisions where only opposite-moving neighbors (positive then…
Companies: Amazon, D. E. Shaw, JPMorgan Chase, Meta +2
Array · Simulation · Stack
Last reported Mar 2026
Convert a sequence of sampled call stacks into function entry and exit events. Handle recursive calls and discuss the effect of limited history.
Companies: Anthropic
Arrays & Strings · Profiling · Recursion · Stacks
Last reported Mar 2026
Given two sorted arrays, merge them into a single sorted array without using built-in sort functions. The resulting array should contain all elements from both…
Companies: Meta
Last reported Mar 2026
Given a priority queue of orders, each with a name, amount, and type (Fizz or Buzz), match Fizz orders to Buzz orders and fulfill them…
Companies: Google
Last reported Mar 2026
Design a system to calculate the total cost of resource usage across a list of time intervals, given a default price per unit time and…
Companies: Crusoe
Last reported Mar 2026
Group tree nodes by their horizontal (column) index and return a list of columns from leftmost to rightmost, preserving top-to-bottom order and left-to-right ordering for…
Companies: Bloomberg, Meta, Uber
Last reported Mar 2026
Given an array of integers, select two elements at non-adjacent indices such that their sum is maximized. Return the maximum possible sum.
Companies: Meta
Last reported Mar 2026
Design a data structure that, given a continuous stream of numbers and a fixed window size k, returns the moving average of the last k…
Companies: Box, Google, Meta, Spotify
Array · Data Stream · Design · Queue
Last reported Mar 2026
Implement a priority queue data structure from scratch without using built-in priority queue libraries. Your implementation should support core operations such as insert…
Companies: Microsoft
Last reported Mar 2026
Given an n×n binary grid where you can flip at most one 0 to 1, compute the largest possible 4-directional island size after the flip…
Companies: DoorDash, Meta, TikTok, Uber
Array · Breadth-First Search · Depth-First Search · Matrix
Last reported Mar 2026
Given trips as [numPassengers, from, to] on a one-way (eastbound) route, determine if the vehicle's passenger count ever exceeds capacity while picking up and dropping…
Companies: Meta
Last reported Mar 2026
Design an algorithm to merge three sorted arrays into a single sorted array. This is similar to the LeetCode question 'Merge Sorted Arrays' but involves…
Companies: Meta
Last reported Mar 2026
Design algorithms to serialize an N-ary tree into a single string and deserialize it back, preserving node values and the arbitrary number and order of…
Companies: Apple, Bloomberg, Rubrik, TikTok
Breadth-First Search · Depth-First Search · String · Tree
Last reported Mar 2026
Arrange the characters of a string into a zigzag pattern across numRows and then read the rows sequentially to produce the converted string. The core…
Companies: Amazon, Bloomberg, Google, Oracle +1
String
Last reported Mar 2026
Design a pair of functions to serialize a list of strings into a single string and deserialize it back losslessly, handling arbitrary characters and empty…
Companies: OpenAI
Last reported Mar 2026
Find the length of the longest string in the array that is a subsequence of itself but not a subsequence of any other string in…
Companies: Netflix
Last reported Mar 2026
Given a flights graph and a matrix of vacation days per city per week, start at city 0 and choose each week whether to stay…
Companies: Apple, Datadog, Meta
Last reported Mar 2026
Given an order containing items and quantities, and a shipping cost structure, implement a function to calculate the total shipping cost. The shipping cost structure…
Companies: Stripe
Last reported Mar 2026
Given an ascending array of unique integers that has been rotated, find its minimum element in O(log n) time by identifying the rotation pivot using…
Companies: Meta
Last reported Mar 2026
Given the root of a binary search tree and an inclusive range [low, high], return the sum of all node values that fall within the…
Companies: Meta
Last reported Mar 2026
Count the number of contiguous, non-empty subarrays whose elements sum to k. Because nums can include negatives (so two-pointer sliding window doesn't work), use cumulative…
Companies: Amazon, Apple, Bloomberg, Google +3
Array · Hash Table · Prefix Sum
Last reported Mar 2026