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 426–450
Given a binary string where every second all occurrences of "01" simultaneously become "10", determine how many seconds until no "01" remains; the core challenge…
Companies: Salesforce
Dynamic Programming · Simulation · String
Last reported Jun 2026
Given an m×n binary grid of live (1) and dead (0) cells, compute the next generation of Conway's Game of Life by applying the 8-neighbor…
Companies: Amazon
Last reported Jun 2026
Design and implement an object-oriented hotel reservation system. The system should include classes for managing rooms, bookings, and customer data, with a focus on proper…
Companies: Apple, Expedia
Last reported Jun 2026
Return the longest prefix string common to all strings in the array, or an empty string if none exists. The task reduces to comparing characters…
Companies: Amazon, Apple, Bloomberg, Google +3
Array · String · Trie
Last reported Jun 2026
Companies: Apple, Bloomberg
Linked List
Last reported Jun 2026
Debug and improve an existing payment transfer order service by fixing code issues and enhancing data consistency through proper use of transactions and locks.
Companies: Wise
Last reported Jun 2026
Choose a subset of non-overlapping jobs (jobs may touch at endpoints) to maximize total profit — the classical weighted interval scheduling problem. With up to…
Companies: Airbnb
Array · Binary Search · Dynamic Programming · Sorting
Last reported Jun 2026
Design a stack supporting push, pop, top, and getMin operations all in O(1) time. The core challenge is to maintain and update the current minimum…
Companies: Expedia, Snowflake
Design · Stack
Last reported Jun 2026
Companies: OpenAI
Data Structure Design · Partitioning & Consistent Hashing
Last reported Jun 2026
Given a list of numbers, the delta series is computed by taking the difference between each consecutive pair of numbers (e.g., [1, 2, 4, 7…
Companies: SpaceX
Last reported Jun 2026
Given a directed graph whose underlying undirected graph is a tree, compute for every node the minimum number of edge reversals required so that starting…
Companies: Microsoft, Salesforce, Uber
Breadth-First Search · Depth-First Search · Dynamic Programming · Graph Theory
Last reported Jun 2026
Given an integer array and a window size k, return the maximum value for each contiguous subarray (sliding window) as it moves one step to…
Companies: Amazon, Bloomberg, D. E. Shaw, Expedia +7
Array · Heap (Priority Queue) · Monotonic Queue · Queue
Last reported Jun 2026
Return the elements of an m×n matrix in diagonal (zigzag) order, alternating between up-right and down-left along each diagonal. The core insight is to group…
Companies: Amazon, Meta
Last reported Jun 2026
Given a Hangout chat log, find the top k contributors, and return the result in reverse order.
Companies: Google, Walmart
Last reported Jun 2026
Given an expression "num1+num2", insert a '(' somewhere to the left of '+' and a ')' to the right to minimize the evaluated result —…
Companies: eBay, Meta
Enumeration · String
Last reported Jun 2026
Given two non-negative integers as decimal strings, return their sum as a string by simulating digit-by-digit addition from the least significant digits with carry (no…
Companies: Google, Meta, Pinterest, Uber
Last reported Jun 2026
Evaluate a string expression containing integers, '+', '-', parentheses and spaces (with unary '-' allowed) and return its numeric result without using eval. The core…
Companies: Flex, Microsoft
Last reported Jun 2026
Find the maximum sum of any non-empty connected path in a binary tree (nodes used at most once), where the path can start and end…
Companies: Amazon, Datadog, DoorDash, Expedia +4
Binary Tree · Depth-First Search · DP on Trees · Dynamic Programming
Last reported Jun 2026
Given a list of intervals [x_start, x_end] (endpoints inclusive), find the minimum number of points on the x-axis (vertical arrows) such that each interval contains…
Companies: Amazon, Atlassian, Expedia, Google
Array · Greedy · Sorting
Last reported Jun 2026
Return the power set of a unique-element integer array by enumerating all 2^n subsets (typical solutions use backtracking/DFS or bitmask iteration), noting the exponential…
Companies: Amazon, Docusign, Meta, Microsoft
Array · Backtracking · Bit Manipulation
Last reported Jun 2026
Find all shortest sequences transforming beginWord to endWord by changing one letter at a time using only words from wordList; treat words as nodes in…
Companies: Bloomberg, Meta, Nielsen
Last reported Jun 2026
Companies: Anthropic
Data Structure Design · Simulation & State Machines
Last reported Jun 2026
You are given a full stack repository ahead of time and asked to implement a series of user stories during the interview. The interviewer provides…
Companies: Intuit, Relevance Ai
Last reported Jun 2026
Companies: Anthropic
Last reported Jun 2026