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 501–525
Simulate a Minesweeper click on an m×n board: clicking a mine turns it to 'X', while clicking an empty square requires counting adjacent mines —…
Companies: Meta, Microsoft, Nuro, Uber
Array · Breadth-First Search · Depth-First Search · Matrix
Last reported Jun 2026
Implement a system to simulate combat between monsters with different attributes and abilities. Design the logic to handle turn-based fighting mechanics and determine the winner.
Companies: OpenAI
Last reported Jun 2026
Determine (1) the user who rated the most distinct movies by aggregating MovieRating and breaking ties by the lexicographically smallest user name, and (2) the…
Companies: Atlassian, Rippling
Last reported Jun 2026
Rotate an integer array to the right by k steps (k may exceed the array length), effectively moving each element to index (i+k) mod n…
Companies: Apple, Microsoft, Nutanix, TikTok
Array · Math · Two Pointers
Last reported Jun 2026
Check whether a string becomes a palindrome after lowercasing and removing all non-alphanumeric characters. The typical challenge is to do this efficiently (O(n)) by scanning…
Companies: Apple, Bloomberg, Meta
String · Two Pointers
Last reported Jun 2026
Given an m×n letter grid and a list of words, find all words that can be formed by sequentially adjacent (horizontal/vertical) non-repeating cells. The core…
Companies: Amazon, Bloomberg, Glean, Google +2
Array · Backtracking · Matrix · String
Last reported Jun 2026
Return all distinct non-decreasing subsequences (length ≥ 2) from an integer array — generate subsequences in index order using DFS/backtracking while avoiding duplicate…
Companies: Microsoft
Last reported May 2026
Given the head of a linked list and an integer k, reverse the nodes of the list k at a time and return the modified…
Companies: Adobe, Microsoft, TikTok
Linked List · Recursion
Last reported May 2026
Companies: Microsoft
Last reported May 2026
Given an array of integers, find and print all pairs of numbers that have the smallest difference between them, returning the results in increasing order…
Companies: Microsoft
Last reported May 2026
Find the maximum length subsequence of positive integers that sums exactly to target (or return -1 if none exists). This is a 0/1 knapsack–style problem…
Companies: Booze Allen Hamilton
Last reported May 2026
Given an n×n binary grid (n a power of two), recursively build a quadtree by subdividing the grid into four equal quadrants until each region…
Companies: Snowflake, Uber
Array · Divide and Conquer · Matrix · Tree
Last reported May 2026
Implement a math interpreter that processes a list of string commands acting on a single global integer x (initially 0). Commands are: ADD k (add…
Companies: Snowflake
Last reported May 2026
Find a contiguous subarray whose first and last elements differ by exactly k and return the maximum possible subarray sum (or 0 if none). With…
Companies: Meta
Last reported May 2026
Given a number, rearrange its digits to form the smallest palindrome strictly greater than the original using exactly the same digits (or report impossible). The…
Companies: Uber
Last reported May 2026
Companies: eBay, Meta, Microsoft
Linked List · Recursion · Stack · Two Pointers
Last reported May 2026
Reverse the digits of a signed 32-bit integer, preserving the sign, and return the reversed number or 0 if reversing would overflow the 32-bit signed…
Companies: Bloomberg, eBay, Google, Meta +2
Math
Last reported May 2026
For each prefix formed by typing characters of a search word, return up to three lexicographically smallest products from a given list that share that…
Companies: eBay, Meta, Miro
Last reported May 2026
Given an integer grid where you can move 4-directionally from the top-left to the bottom-right, find a path that maximizes the minimum cell value along…
Companies: Google
Last reported May 2026
Given a list of drugs a patient is taking and a dictionary of known drug interactions with severity levels, determine which drugs interact with one…
Companies: Ro
Last reported May 2026
Given a sorted array, remove duplicates in-place so each unique value appears only once (preserving order) and return the count k of unique elements. This…
Companies: Bloomberg, Google, Meta, Microsoft
Array · Two Pointers
Last reported May 2026
Given an m×n matrix, set every row and column to zero wherever an element is zero, modifying the matrix in-place. The key challenge is to…
Companies: Meta, Microsoft
Last reported May 2026
Companies: Anthropic
Data Structure Design · Payments & Ledgers
Last reported May 2026
Given sorted tax brackets with upper bounds and percentages, compute the progressive tax on a given income by summing, for each bracket in order, the…
Companies: Bloomberg, Gusto, Snowflake
Array · Simulation
Last reported May 2026