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 526–550
Determine whether iterating n -> sum of the squares of its digits eventually reaches 1 or falls into a repeating cycle; the core task is…
Companies: Snowflake
Floyd's Cycle Finding Algorithm · Hash Table · Math · Two Pointers
Last reported May 2026
Companies: Anthropic
Data Structure Design · Parsing & Interpreters
Last reported May 2026
Given positions of workers and bikes on a 2D grid, assign each worker a distinct bike to minimize the total Manhattan distance (return the bike…
Last reported May 2026
Find the minimum number of obstacles (cells with value 1) you must remove to get from the top-left to the bottom-right of an m×n grid…
Companies: Salesforce
Last reported May 2026
Given a nested list of integers and sublists, compute the total sum where each integer is multiplied by its depth in the nesting. The challenge…
Companies: Meta, Roblox
Last reported May 2026
Partition the string into the maximum number of contiguous parts such that each letter appears in at most one part, and return the sizes of…
Companies: SoFi
Last reported May 2026
Return two lists containing the distinct integers that appear in nums1 but not in nums2, and that appear in nums2 but not in nums1 —…
Companies: Google
Last reported May 2026
Given equal-length lowercase words, return all queries that can be turned into some dictionary word with at most two letter substitutions — equivalently, whose Hamming…
Companies: Google
Last reported May 2026
Design a data structure that supports addScore(playerId, score), reset(playerId), and top(K) which returns the sum of the top K players' scores; the core challenge is…
Companies: Microsoft, Uber, Yahoo
Last reported May 2026
Given an unordered list of all nodes of an N-ary tree (nodes have children pointers but no parent pointers), identify the root — the single…
Companies: Google
Last reported May 2026
Companies: Anthropic
Simulation & State Machines
Last reported May 2026
Create a service that generates an image of rendered text using a supplied font and text content.
Companies: Canva
Last reported May 2026
Given axis-aligned squares (xi, yi, li) whose overlaps count multiply, find the smallest horizontal line y such that the sum of areas of all squares…
Companies: Amazon, Google
Last reported May 2026
Find the length of the shortest transformation sequence from beginWord to endWord where each step changes exactly one letter and every intermediate word must be…
Companies: Amazon, Apple, Fan, Meta +5
Bidirectional Search · Breadth-First Search · Hash Table · String
Last reported May 2026
Check a 9x9 Sudoku board is valid by verifying that no digit 1–9 (ignoring '.') appears more than once in any row, column, or 3x3…
Companies: Amazon, Cisco, Microsoft
Array · Hash Table · Matrix
Last reported May 2026
Find the smallest positive integer missing from an unsorted array while meeting O(n) time and O(1) extra space. The classic approach uses in-place index-based placement…
Companies: Lyft
Last reported May 2026
Implement a task manager that supports named tasks, priorities, user quotas, and expiring assignments. Preserve assignment history so later operations can identify overdue work.
Companies: Airbnb, Anthropic
CodeSignal · Progressive Assessment · State Machines
Last reported May 2026
Companies: Anthropic
Concurrency · Data Structure Design
Last reported May 2026
Companies: Anthropic
Last reported May 2026
Design a time-limited key-value store with set(key, value, duration) that returns true if it overwrote an unexpired key (false otherwise), get(key) returning the value or…
Companies: Amazon, Netflix
Last reported May 2026
Given n rows of 10 seats and a list of reserved seats, maximize the number of four-person groups that can be placed on adjacent seats…
Companies: Meta
Last reported May 2026
Given one or more relational tables and a target result set, write a SQL query that produces the specified output—typically requiring joins, grouping/aggregation, conditional…
Companies: OpenAI
Last reported May 2026
Given a grid with grass, fire, and impassable walls, determine the maximum minutes you can wait at (0,0) before starting to move so that you…
Companies: Google, Uber
Array · Binary Search · Breadth-First Search · Matrix
Last reported May 2026
Given target coordinates (x, y), find the minimum number of knight moves required to reach that square from (0,0) on an infinite chessboard. This is…
Companies: eBay, Google, LinkedIn, Meta +1
A* Search · Bidirectional Search · Breadth-First Search · Heuristic Search
Last reported May 2026