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 726–750
Companies: OpenAI
Intervals & Scheduling
Last reported Mar 2026
Given an n×n binary grid containing exactly two 4-connected islands, return the minimum number of 0→1 flips needed to connect them. The core challenge is…
Companies: Meta, Microsoft
Last reported Mar 2026
Find the minimum number of steps in a walk that visits every node of an undirected connected graph (n ≤ 12), where revisiting nodes/edges is…
Companies: Google, Intuit, LinkedIn
Last reported Mar 2026
Companies: Meta
Last reported Mar 2026
Write a program that identifies and returns duplicate lines (records) that appear across multiple input files. The solution should efficiently handle large files and provide…
Companies: Meta
Last reported Feb 2026
Companies: Anthropic
API Integration & HTTP Clients · Concurrency
Last reported Feb 2026
Design and implement a thread-safe lottery system that supports adding/removing users with equal weights and selecting random winners. The system must handle concurrent…
Companies: Apple
Last reported Feb 2026
Implement a function to validate credit card numbers using the Luhn algorithm. The function should return true if the credit card number is valid, false…
Companies: Capital One
Last reported Feb 2026
Given recipes whose ingredients may include other recipes and an initial set of supplies, determine which recipes can be produced; the core challenge is dependency…
Companies: Amazon, Google, Tesla
Array · Directed Acyclic Graph · Graph Theory · Hash Table
Last reported Feb 2026
Given a binary array, find the maximum length of a contiguous subarray of 1s you can get by flipping at most one 0 to 1…
Companies: Bloomberg, Snapchat
Last reported Feb 2026
Determine whether an array of up to 16 small positive integers can be split into k non-empty subsets whose sums are equal. This is a…
Companies: Amazon
Last reported Feb 2026
Split the array into k non-empty contiguous subarrays so that the maximum subarray sum is as small as possible, and return that minimized largest sum…
Companies: Amazon, Google, Microsoft, Pinterest +2
Array · Binary Search · Dynamic Programming · Greedy
Last reported Feb 2026
Given source and target strings and a list of allowed substring → substring replacement rules with costs, compute the minimum total cost to transform source…
Companies: Microsoft
Last reported Feb 2026
Implement the Floyd-Warshall algorithm to find shortest paths between all pairs of vertices in a weighted graph.
Companies: Microsoft
Last reported Feb 2026
Given an m×n board of integer "candies," repeatedly find and remove any horizontal or vertical runs of ≥3 identical candies, let the remaining candies fall…
Companies: Meta, Microsoft, Roblox
Array · Matrix · Simulation · Two Pointers
Last reported Feb 2026
Compute the minimum cost to travel along a train line from a start to a destination given stations, scheduled departures, and multiple fare/ticket options (including…
Companies: Meta
Last reported Feb 2026
Given strings s and p, return all start indices of substrings in s that are anagrams of p; the core challenge is to detect equal…
Companies: Amazon, Databricks, Microsoft
Hash Table · Sliding Window · String
Last reported Feb 2026
Design a class that stores an integer array and supports reset (returning the original configuration) and shuffle (returning a uniformly random permutation so that all…
Companies: Microsoft, Uber
Array · Design · Math · Randomized
Last reported Feb 2026
Write a program that fetches a document from a URL containing space-separated words and performs word counting. Additionally, explain how you would modify your approach…
Companies: Intuit
Last reported Feb 2026
Count the number of length-5 palindromic subsequences in a digit string (they must have the form a b c b a) and return the result…
Companies: Meta, Uber
Last reported Feb 2026
Companies: OpenAI
Data Structure Design · Heaps & Priority Queues
Last reported Feb 2026
Companies: Adobe, Google, LinkedIn, Meta +2
Linked List · Recursion
Last reported Feb 2026
Return the boundary of a binary tree: list nodes on the left boundary top-down (excluding leaves), then all leaves left-to-right, then the right boundary bottom-up…
Companies: Amazon, Meta, Snowflake
Binary Tree · Depth-First Search · Tree
Last reported Feb 2026
Implement retry logic for a flaky product API and process the JSON response to enable efficient searching of related products.
Companies: Sierra Ai
Last reported Feb 2026
Compare and contrast the three synchronization primitives (mutex, semaphore, and spinlock) in terms of their implementation, use cases, and performance characteristics.
Companies: NVIDIA
Last reported Feb 2026