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 401–425
Companies: Anthropic
Grids & Matrices · Simulation & State Machines
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
Given a list of logs each containing a user ID, TV show name, and episode watched, implement functions to: (1) process the input logs, and…
Companies: Bloomberg
Last reported Jul 2026
Reorder string s to follow the custom precedence defined by string order: every character that appears in order must appear in s in that relative…
Companies: Merge, Meta
Last reported Jul 2026
Given the root of an n-ary tree, return its maximum depth — the number of nodes along the longest root-to-leaf path. This is a simple…
Companies: Apple, Merge
Last reported Jul 2026
Given a list of meeting time intervals [start, end], determine whether any two intervals overlap so a single person can attend all meetings; this is…
Companies: Amazon, Google, Meta, Procore +1
Last reported Jul 2026
Given a string s and a non-negative integer k, find the length of the longest substring that contains exactly k distinct characters. Return -1 if…
Companies: Adobe
Last reported Jul 2026
Given a text string (e.g., a Lorem Ipsum passage), implement a series of functions to extract statistical information: the number of sentences, the number of…
Companies: Kaluza
Last reported Jul 2026
Implement two complementary algorithms to convert a binary tree to a string and back, preserving exact node values and tree structure (including null children) so…
Companies: Amazon, LinkedIn, Meta, Microsoft +2
Last reported Jul 2026
Given a list of meeting time intervals, determine the minimum number of conference rooms required so that no meetings overlap. This may involve handling 'Do…
Companies: Bloomberg, Google, Oracle
Last reported Jul 2026
Given a text string and a set of target words, find and replace all occurrences of those words in the text, treating whitespace as a…
Companies: Google
Last reported Jul 2026
Design a Social Network class that tracks follower relationships between users. Implement the following operations: follow(userA, userB), unfollow(userA, userB), snapshot()…
Companies: OpenAI
Last reported Jul 2026
Design an in-memory database system that can efficiently handle transactions. Consider aspects such as data storage, transaction management, and concurrency control.
Companies: Anchorage Digital, Coinbase, Lyft, Uber
Last reported Jul 2026
Design a file system that supports basic operations including file lookup, directory navigation (cd command), and directory listing (ls command).
Companies: Anchorage Digital, Oracle
Last reported Jul 2026
Implement a Twitter class that supports posting tweets, following/unfollowing users, and retrieving the 10 most recent tweet IDs in a user's news feed. The core…
Companies: Coupang, Google, Headout
Last reported Jul 2026
Companies: TikTok
Last reported Jul 2026
Given two non-decreasing arrays, return the k pairs (one element from each) with the smallest sums — the challenge is to efficiently produce the smallest…
Companies: LinkedIn
Array · Heap (Priority Queue)
Last reported Jul 2026
Implement HashMap Implement EventEmitter Promise related questions
Companies: Microsoft
Last reported Jul 2026
Given an m×n grid of alphanumeric characters and a target pattern string, determine whether the pattern can be formed by a path of adjacent (up/down/left/right)…
Companies: Meta, Roblox
Array · Hash Table · Matrix · 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
Companies: Stripe
Last reported Jul 2026
Given a list of intervals (endpoints touching allowed), find the minimum number to remove so the remaining intervals are pairwise non-overlapping — equivalently, select the…
Companies: Amazon, Docusign, Grammarly
Array · Dynamic Programming · Greedy · Sorting
Last reported Jul 2026
Given the root of a binary tree, return its maximum depth — the number of nodes along the longest root-to-leaf path. This classic easy problem…
Companies: Google, LinkedIn
Binary Tree · Breadth-First Search · Depth-First Search · Tree
Last reported Jun 2026
Given an array where each move increments n−1 elements by 1 (equivalently decrementing a single element), compute the minimum moves to equalize all elements —…
Companies: Amazon
Last reported Jun 2026