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 551–575
Simulate the OS Alt+Tab behavior: given a sequence of window events (open, close, and Alt+Tab/Shift+Alt+Tab cycles), maintain the most-recently-used ordering and current focus…
Companies: Meta
Last reported May 2026
Evaluate a string arithmetic expression containing integers, +, -, *, /, parentheses and unary signs, respecting operator precedence and parentheses. The challenge is to parse…
Companies: Google, Intuit, Meta
Math · Recursion · Stack · String
Last reported May 2026
Companies: OpenAI
Grids & Matrices · Simulation & State Machines
Last reported May 2026
Given a string s and integer k, determine whether you can delete at most k characters to make s a palindrome. This essentially asks whether…
Companies: Meta
Last reported May 2026
Implement a credit card payment system that validates a credit card number using the Luhn (Mod 10) algorithm and applies the appropriate discount to a…
Companies: Miq Digital
Last reported May 2026
Design a data structure to store log entries by id with timestamps and support put(id, timestamp) and retrieve(start, end, granularity) returning all ids whose timestamps…
Companies: CrowdStrike, Pinterest
Last reported May 2026
Given a string using '\n' and '\t' to represent a nested filesystem, compute the length of the longest absolute path to any file. The core…
Companies: CrowdStrike, Datadog
Last reported May 2026
Wrap an existing iterator to add a peek() operation that returns the next element without advancing the iterator, while preserving correct behavior for next() and…
Companies: Roku
Last reported May 2026
Design an online autocomplete system that processes characters one-by-one, returning the top 3 historically most frequent sentences that match the current prefix (ranked by…
Companies: Google, Netflix, Pinterest, Vercel
Data Stream · Depth-First Search · Design · Heap (Priority Queue)
Last reported May 2026
Given a boolean array where the first element is always true and the last element is always false, find and return any index i such…
Companies: Google
Last reported May 2026
Maintain an evolving rooted family tree (king as root) that supports adding a child and marking a person dead, and return the current inheritance order…
Companies: Apple, Snowflake
Depth-First Search · Design · Hash Table · Tree
Last reported May 2026
Count how many islands (4-directionally connected 1s) in grid2 are entirely contained within corresponding land cells in grid1 — traverse each island in grid2 (DFS/BFS)…
Companies: Google
Last reported May 2026
Given a binary string s, perform at most one swap between any two characters, then select a substring with an equal number of '0's and…
Companies: LinkedIn
Last reported May 2026
Companies: OpenAI
Android · UI Components & Accessibility
Last reported May 2026
Implement a simple in-memory database that supports nested transactions using begin, commit, and rollback operations. Rollback should only revert the current transaction, while…
Companies: IBM
Last reported May 2026
Given a binary tree and the node x chosen by player 1, determine whether player 2 can pick a node y that guarantees victory by…
Companies: Anduril
Binary Tree · Depth-First Search · Tree
Last reported May 2026
Reconstruct the original binary tree from its preorder and inorder traversal arrays (with unique values). The core challenge is using preorder to pick each root…
Companies: Microsoft
Last reported May 2026
Reconstruct a binary tree from its preorder and postorder traversal arrays of distinct values. The core challenge is using the traversal orders to determine subtree…
Companies: Microsoft
Last reported May 2026
Given a digit string, count how many ways it can be segmented into valid codes 1–26 (two-digit codes cannot start with '0'), handling invalid zeros…
Companies: Anduril, Lyft, Meta
Dynamic Programming · String
Last reported May 2026
Implement an API to book the cheapest available flight. A code framework and PostgreSQL database are provided; you may use any programming language. The system…
Companies: Circle
Last reported May 2026
Find all root-to-leaf paths in a binary tree whose node values sum to targetSum, returning each path as a list of values. This is solved…
Companies: Amazon, Meta, Microsoft, Salesforce
Backtracking · Binary Tree · Depth-First Search · Tree
Last reported May 2026
Implement a trie (prefix tree) that supports insert, exact-word search, and prefix search for lowercase English words. Each operation should run in O(length) time per…
Companies: Google DeepMind, Nielsen, TikTok
Last reported Apr 2026