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 26–50
Given n people labeled 0 to n-1 and an API knows(a, b) that returns true if person a knows person b, find the celebrity —…
Companies: HubSpot, LinkedIn
Last reported Oct 2026
Find the maximum total sum of two non-overlapping contiguous subarrays of given lengths firstLen and secondLen (either order allowed). Typical approach uses prefix sums or…
Companies: Meta, Sprinklr
Array · Dynamic Programming · Sliding Window
Last reported Oct 2026
Given a log of timestamped audiobook completion events, implement a recommendation system that analyzes customer listening patterns to suggest what a user should listen to…
Companies: Audible
Last reported Oct 2026
Implement an LRUCache that supports O(1) average-time get(key) returning the value or -1 and put(key, value) which inserts or updates a key and, if capacity…
Companies: Adobe, Amazon, Anthropic, Apple +29
Data Structure Design · Design · Doubly-Linked List · Hash Table
Last reported Oct 2026
Given a DAG as adjacency lists, enumerate all possible paths from source node 0 to target node n−1 and return each path as a list…
Companies: Bloomberg
Last reported Oct 2026
Build an autocomplete input component that fetches and displays matching users by name or email as the user types, using a provided `queryUsers` API, with…
Companies: Kikoff
Last reported Oct 2026
Given an on-call rotation schedule with each person's name, start timestamp, and end timestamp, return a non-overlapping rotation table showing all people on-call during each…
Companies: Google
Last reported Oct 2026
Given a stream of stock trade notifications, each containing a ticker symbol and a volume, track the cumulative volume traded for each stock and efficiently…
Companies: Bloomberg
Last reported Oct 2026
Debug and complete the implementation of a traffic router using the round robin algorithm. Identify and fix any bugs in the existing code, ensure all…
Companies: Brex, DoorDash, Paxos
Last reported Oct 2026
Design a rate limiting system that can control the number of requests a user or client can make within a specified time window, preventing abuse…
Companies: Amazon, Apple, Cohesity, Coupang +3
Last reported Oct 2026
Implement a custom React hook called useQuery that manages asynchronous data fetching via a promise. The hook should handle loading, success, and error states for…
Companies: Perplexity
Last reported Oct 2026
Given a nested list of integers, compute the sum where each integer is weighted by the reverse of its depth (elements deeper in the nesting…
Companies: LinkedIn, Meta
Breadth-First Search · Depth-First Search · Stack
Last reported Oct 2026
Design a data structure that supports incrementing and decrementing string counts (removing keys when their count drops to zero) and can return any key with…
Companies: Atlassian, LinkedIn, Meta, Microsoft +2
Design · Doubly-Linked List · Hash Table · Linked List
Last reported Oct 2026
Design a class that consumes messages from multiple redundant feeds carrying the same sequenced content and republishes a single clean, ordered, deduplicated stream where a…
Companies: Citadel
Last reported Oct 2026
Maintain an array-backed stream of n (id, value) pairs arriving out of order and, on each insert, return the largest contiguous chunk of values starting…
Companies: Citadel
Last reported Oct 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
Given a list of three-digit integers encoding a binary tree (hundreds=d epth, tens=position in level, ones=node value), compute the sum of all root-to-leaf path sums…
Companies: Grab
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
Find the shortest path (degree of separation) between two user profiles in a social network graph. How do you handle the search space explosion caused…
Companies: LinkedIn
Last reported Oct 2026
Given a sorted array of n elements, possibly with duplicates, find the number of occurrences of a target element.
Companies: Meta
Last reported Oct 2026
Build a reusable Toast component in React based on provided UI specs and a demo video. The component should match the given design and replicate…
Companies: OpenAI
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
Design and implement a file search system that can traverse directory structures and locate files based on various criteria. The solution should incorporate object-oriented…
Companies: Amazon, Anduril, Atlassian, Google +1
Last reported Oct 2026
Given an array of non‑negative integers encoded as decimal strings (no leading zeros) and an integer k, return the k-th largest numeric value treating duplicates…
Companies: Evernorth, Meta, Spotify
Last reported Oct 2026
Find the minimum integer eating speed k such that the total hours required (sum over piles of ceil(piles[i]/k)) is ≤ h; because the required hours…
Companies: Amazon, Bloomberg, Coupang, DoorDash +6
Array · Binary Search
Last reported Oct 2026