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
Build an in-memory analytics service that ingests a stream of chat interaction logs and supports efficient sliding-window queries for recent interaction counts, live session…
Companies: OpenAI
Last reported Nov 2026
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
For each query string, find the index of the container string that shares the longest common suffix with it, breaking ties by the shorter container…
Companies: Google
Last reported Nov 2026
Design a hit counter that records timestamps of hits and returns the number of hits in the past 5 minutes (300 seconds). The challenge is…
Companies: Adyen, Apple, Cisco, Databricks +5
Array · Binary Search · Data Stream · Design
Last reported Nov 2026
Given an array of strings representing consecutive fragments of an original string, reconstruct the original string by arranging the fragments in the correct order. Each…
Companies: Microsoft
Last reported Nov 2026
Given two strings, determine if they are blanagrams of each other. Two words are blanagrams if they have the same length and can be transformed…
Companies: Okta
Last reported Nov 2026
Given a set of bootloader instructions (Jump, Plus, Next), determine if the instruction sequence contains an infinite loop. If a loop is detected, find the…
Companies: Anthropic
Last reported Nov 2026
Given numCourses and prerequisite pairs, return any ordering of courses that satisfies all prerequisites or an empty array if impossible — this is essentially computing…
Companies: Amazon, Anduril, Apple, Citadel +11
Breadth-First Search · Depth-First Search · Graph Theory · Topological Sort
Last reported Nov 2026
Design a `findShip` method that takes a coordinate as input and determines whether an attack results in a hit, miss, or sunk ship. The solution…
Companies: GitHub
Last reported Nov 2026
Design and simulate a distributed job processing system with producers, a job coordinator, and consumers. Extend the system to support scheduled/delayed jobs and multi-tenancy…
Companies: Humaninterest
Last reported Nov 2026
Design an API/class that calculates payout for a delivery driver (Dasher) based on delivery events from an external service. Each delivery has events with timestamps…
Companies: DoorDash
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
Simulate a Snake game on an m×n grid supporting move(direction): the snake advances, grows when it eats sequentially placed food (increasing score), and the game…
Companies: Apple, Atlassian, Bloomberg, Meta +1
Last reported Nov 2026
Code a simple KV with serialize/deserialize functions, where key/value are strings and can contain any character.
Companies: OpenAI
Last reported Nov 2026
Implement an LFU cache with O(1) average-time get and put operations that evicts the least-frequently-used key when capacity is exceeded, breaking ties by least-recently-used…
Companies: Amazon, Apple, Cisco, Goldman Sachs +3
Design · Doubly-Linked List · Hash Table · Linked List
Last reported Nov 2026
Given an N×M city grid where delivery centers are marked as 1 and houses as 0, find the minimum possible maximum Chebyshev distance (8-directional movement)…
Companies: Amazon
Last reported Nov 2026
Given a string of lowercase letters and parentheses, remove the minimum number of '(' or ')' characters so the remaining string is a valid parentheses…
Companies: Bloomberg, Meta, Microsoft
Last reported Nov 2026
Design and implement a movie recommendation system that suggests related or similar films based on a given input movie or user preferences. Your solution should…
Companies: Google, Intuit, Netflix
Last reported Nov 2026
Given a dependency adjacency list to install packages, return the installation order or throw an exception if a cycle is found.
Companies: Amazon, Uber
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
Given an array of words and a maximum line width maxWidth, format the text so that each line has exactly maxWidth characters and is fully…
Companies: Airbnb, Amazon, Anyscale, Capital One +3
Array · Simulation · String
Last reported Nov 2026
Given a 2D grid containing empty rooms/spaces (INF), walls/obstacles (-1), and gates (0), fill each empty room with the shortest distance to its nearest gate…
Companies: DoorDash, Microsoft, Spotify
Last reported Nov 2026
Implement a Web API client with circuit breaker functionality that blocks requests to a service after 3 failures within 10 minutes, then reopens after a…
Companies: Databricks, Uber, Wise
Last reported Oct 2026
Implement a Tic-Tac-Toe class for an n×n board that supports making moves and immediately reports whether a player wins; the key challenge is designing state…
Companies: Airwallex, Amazon, Databricks, Meta +1
Last reported Oct 2026
Given a binary tree, simulate the process of repeatedly removing all current leaf nodes and recording their values until the tree is empty. Return a…
Companies: Amazon, eBay, Google, LinkedIn +1
Last reported Oct 2026