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 676–700
Given daily stock prices, compute the maximum profit you can achieve with unlimited buy/sell operations while holding at most one share at a time (you…
Companies: Apple, Bloomberg, Meta, Oracle
Array · Dynamic Programming · Greedy
Last reported Mar 2026
Convert a non-negative integer to its English words representation. The core challenge is chunking the number into three-digit groups (ones, thousands, millions, billions)…
Companies: Amazon, Microsoft
Math · Recursion · String
Last reported Mar 2026
Given unlimited coins of specified denominations, count how many distinct combinations (order irrelevant) sum to a target amount. This is a classic unbounded knapsack /…
Companies: Pinterest
Last reported Mar 2026
Companies: OpenAI
Last reported Mar 2026
Design and implement the core game logic for a Tetris game, including piece movement, rotation, line clearing, and collision detection. Focus on the data structures…
Companies: Microsoft
Last reported Mar 2026
Maintain a sliding window of the last m stream elements and, after discarding the smallest k and largest k values, return the integer average of…
Companies: Google, Meta
Last reported Mar 2026
Given an n×m grid with a starting point and exit point, generate a uniformly random acyclic maze where all paths are equally likely to be…
Companies: Uber
Last reported Mar 2026
Determine whether a pattern p (with '.' matching any single character and '*' meaning zero or more of the preceding element) matches the entire string…
Companies: Amazon, Microsoft
Last reported Mar 2026
Convert each word into its Morse-code string by concatenating the fixed per-letter encodings, and return how many distinct transformations appear across the list — a…
Companies: Oscar Health
Last reported Mar 2026
Given a set of possibly overlapping, unsorted intervals within a domain (e.g., [lower, upper]), compute the maximal uncovered ranges—the complement segments not covered by any…
Companies: Google
Last reported Mar 2026
Companies: Anthropic
Caching · Data Structure Design · Database Internals · System Design
Last reported Mar 2026
Given an m×n grid of non-negative numbers, find the minimum-sum path from the top-left to bottom-right when you may only move right or down. This…
Companies: Goldman Sachs, Oracle
Array · Dynamic Programming · Matrix
Last reported Mar 2026
Determine whether a binary tree contains a root-to-leaf path whose node values add up to a given targetSum. (A leaf is a node with no…
Companies: Amazon, Meta, Oracle
Last reported Mar 2026
Check whether any substring of s2 of length |s1| is a permutation of s1 (i.e., has the same character multiset). The core challenge is to…
Companies: Apple, Meta
Hash Table · Sliding Window · String · Two Pointers
Last reported Mar 2026
Given a starting mass and asteroid masses, determine whether you can order collisions so the planet can sequentially absorb every asteroid (absorbing requires current mass…
Companies: Meta
Last reported Mar 2026
Given an array widths mapping each lowercase letter to its pixel width and a string s, pack characters sequentially into lines with a maximum width…
Companies: Google
Last reported Mar 2026
Companies: Meta
Last reported Mar 2026
Companies: OpenAI
Data Structure Design · Stacks & Queues
Last reported Mar 2026
Given multiple log streams, merge them into a final log and verify that all entries from the original streams are present in the merged result…
Companies: Microsoft
Last reported Mar 2026
Companies: Oracle, Salesforce
Last reported Mar 2026
Count the number of distinct monotonic paths from the top-left to the bottom-right of an m×n grid when you may only move right or down…
Companies: Amazon, Meta, Microsoft, Oracle
Last reported Mar 2026
Given a binary tree and a target node value, return all node values at distance K from the target. The challenge is to traverse both…
Companies: Amazon, Meta, Microsoft, TikTok
Binary Tree · Breadth-First Search · Depth-First Search · Hash Table
Last reported Mar 2026
Given an undirected tree (or graph) where nodes can be toggled "marked," support operations that mark/unmark nodes and queries that ask for the shortest distance…
Companies: DoorDash
Last reported Mar 2026
Given timestamped accesses per employee, find all employees who made three or more accesses within any one-hour period (accesses exactly 60 minutes apart do not…
Companies: PayPal
Last reported Mar 2026