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 1–25
Given a list of meeting time intervals, determine the minimum number of conference rooms required so that no meetings overlap. The core challenge is computing…
Companies: Amazon, Apple, Google, Meta +9
Array · Greedy · Heap (Priority Queue) · Prefix Sum
Last reported Nov 2026
Design an in-memory hierarchical file system that supports path parsing and operations like mkdir, ls, addContentToFile (append/create), and readContentFromFile, requiring you…
Companies: Anchorage Digital, Capital One, Coupang, Datadog +5
Design · Hash Table · Sorting · String
Last reported Nov 2026
Given a list of directed flight tickets, reconstruct an itinerary starting at "JFK" that uses every ticket exactly once and, among all valid itineraries, returns…
Companies: Amazon, Anduril, Google, Pinterest
Array · Depth-First Search · Eulerian Circuit · Eulerian Path
Last reported Nov 2026
Group the input strings into lists of anagrams — i.e., strings that contain the same multiset of letters — and return the groups in any…
Companies: Amazon, Apple, Arize Ai, Bloomberg +14
Array · Hash Table · Sorting · String
Last reported Oct 2026
Count word frequencies and return the k most frequent words sorted by descending frequency, breaking ties by lexicographical order. The core challenge is combining frequency…
Companies: Apple, Microsoft, Oracle, Robinhood
Array · Bucket Sort · Counting · Hash Table
Last reported Oct 2026
Given a list of intervals, merge all overlapping (including touching endpoints) intervals and return the minimal set of non-overlapping intervals that cover them. Key pattern…
Companies: Amazon, Antithesis, Apple, Atlassian +16
Array · Quicksort · Sorting
Last reported Oct 2026
Companies: OpenAI
Low-Level Design (OOP) · Sorting
Last reported Oct 2026
Given an integer array nums and two integers k and m, perform at most k increment operations on any elements, then return the maximum possible…
Companies: Amazon
Array · Bit Manipulation · Greedy · Sorting
Last reported Oct 2026
Given non-overlapping segments where every integer position in [li, ri] holds ci coins, find the maximum total coins covered by any contiguous window of k…
Companies: Amazon
Array · Binary Search · Greedy · Prefix Sum
Last reported Oct 2026
Given arrays of box heights and warehouse room heights, maximize how many boxes can be placed knowing a box can only reach a room if…
Companies: Pinterest
Array · Greedy · Sorting
Last reported Oct 2026
Given an integer array and k, return the k most frequent elements — the core challenge is to count element frequencies and extract the top-k…
Companies: Amazon, Bloomberg, Google, Meta +9
Array · Bucket Sort · Counting · Divide and Conquer
Last reported Oct 2026
For each query threshold, compute how many distinct cells you can reach from the top-left by moving 4-directionally through cells whose value is strictly less…
Companies: Uber
Array · Breadth-First Search · Heap (Priority Queue) · Matrix
Last reported Sep 2026
Find all unique triplets in an integer array that sum to zero, ensuring no duplicate triplets in the output. The core challenge is efficiently enumerating…
Companies: Amazon, Apple, Bloomberg, Google +5
Array · Sorting · Two Pointers
Last reported Sep 2026
Return the k-th largest element (by sorted order, not distinct) from an unsorted array. For inputs up to ~1e5 elements, solve it faster than full…
Companies: Bloomberg, LinkedIn, Meta, Salesforce +1
Array · Divide and Conquer · Heap (Priority Queue) · Quickselect
Last reported Sep 2026
Given tasks labeled A–Z and a cooldown n, compute the minimum number of CPU intervals (including idles) to finish all tasks so that identical tasks…
Companies: Amazon, Apple, Databricks, Docker +3
Array · Counting · Greedy · Hash Table
Last reported Sep 2026
Companies: Anthropic
Batch & Stream Processing · Sorting
Last reported Aug 2026
Given an array of n integers, return the element that appears more than ⌊n/2⌋ times (the majority element is guaranteed to exist). The goal is…
Companies: Amazon, Bloomberg, Coupang, Google +1
Array · Boyer–Moore Majority Vote Algorithm · Counting · Divide and Conquer
Last reported Aug 2026
Given N points on the plane and an integer k, return the k points with the smallest Euclidean distance to the origin (order doesn't matter)…
Companies: Airbnb, Amazon, Asana, Meta
Array · Divide and Conquer · Geometry · Heap (Priority Queue)
Last reported Aug 2026
Given timestamped friendship events among N people, determine the earliest time when the social graph becomes fully connected; process events in chronological order and use…
Companies: Amazon, Google, Uber
Array · Sorting · Union-Find
Last reported Aug 2026
Maintain a data structure that supports adding integers from a stream and returning the current median efficiently for many interleaved addNum and findMedian calls. The…
Companies: Adobe, Amazon, D. E. Shaw, Intuit +4
Data Stream · Design · Heap (Priority Queue) · Sorting
Last reported Aug 2026
Given lists of accounts where each account has a name and emails, merge accounts that share any email by grouping connected emails (e.g., via union-find…
Companies: Airbnb, Bloomberg, Meta, Oracle +1
Array · Breadth-First Search · Depth-First Search · Hash Table
Last reported Aug 2026
Given an integer array sorted in non-decreasing order (which may contain negative numbers), return a new array of the squares of each number, also sorted…
Companies: Bloomberg, Instacart, Uber
Array · Sorting · Two Pointers
Last reported Aug 2026
Given a set of weighted intervals, pick at most two non-overlapping events (events are inclusive, so the next must start at least end+1) to maximize…
Companies: Goldman Sachs, Grammarly
Array · Binary Search · Dynamic Programming · Heap (Priority Queue)
Last reported Jul 2026
Given timestamped website visits by users, find the 3-website sequence (in chronological order) that is visited by the largest number of unique users (count each…
Companies: Amazon, Spotify
Array · Hash Table · Sorting · String
Last reported Jul 2026
Assign each meeting (with unique start times) to the lowest-numbered available room or delay it (keeping its duration and prioritizing earlier original start times) until…
Companies: Apple, Docusign, Google, Meta +2
Array · Hash Table · Heap (Priority Queue) · Simulation
Last reported Jul 2026