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 901–925
Given a sorted (non-decreasing) 1-indexed array, find two distinct elements whose sum equals a target and return their 1-based indices. Because the array is sorted…
Companies: Google
Last reported Nov 2025
Implement a system to track customer ratings for agents and return agents sorted by average rating in descending order. Extend the solution to find the…
Companies: Atlassian
Last reported Nov 2025
Find the length of the longest contiguous "mountain" subarray — a strictly increasing sequence immediately followed by a strictly decreasing sequence with length ≥ 3…
Companies: Oracle, TikTok
Array · Dynamic Programming · Enumeration · Two Pointers
Last reported Nov 2025
Given a binary tree and two target nodes p and q, return their lowest common ancestor if and only if both targets exist in the…
Companies: Amazon, Meta
Last reported Nov 2025
Given an array of daily stock prices and trading constraints (e.g., limits on number of transactions, transaction fees, or cooldowns), compute the maximum profit achievable…
Companies: Meta
Last reported Nov 2025
Given M sorted lists of potentially different lengths, find the Kth smallest (or largest) element across all lists. Each individual list is sorted in ascending…
Companies: Meta
Last reported Nov 2025
Given an array of strings, identify which words appear as substrings of any other word in the array (equivalently, find which words do NOT appear…
Companies: Meta
Last reported Nov 2025
Companies: LinkedIn
Last reported Nov 2025
Companies: Palantir
Last reported Nov 2025
Companies: NVIDIA
Last reported Nov 2025
Count how many ways to assign +/− to each element of nums so the signed sum equals target. This reduces to a subset-sum problem: count…
Companies: Meta, Pinterest
0-1 Knapsack · Array · Backtracking · Dynamic Programming
Last reported Nov 2025
The technical question was a Data Structures and Algorithms question of Leetcode Medium but couched in a way that initially made it seem like a…
Companies: Citadel
Last reported Nov 2025
Companies: Databricks
Last reported Nov 2025
Companies: OpenAI
Parsing & Interpreters
Last reported Oct 2025
Write code that reads data from a CSV file and prints the data in a randomized order.
Companies: Clio
Last reported Oct 2025
Companies: OpenAI
Low-Level Design (OOP) · Simulation & State Machines
Last reported Oct 2025
Companies: Amazon, Bloomberg, Google, Meta +2
Linked List · Math · Recursion
Last reported Oct 2025
Transform a binary tree by flipping it upside down so the original leftmost node becomes the new root and each parent becomes the right child…
Companies: LinkedIn
Last reported Oct 2025
Given an array of integers, write a function to find and return both the second largest and second smallest elements. Handle edge cases where the…
Companies: Amazon
Last reported Oct 2025
Given a 2x3 sliding puzzle with tiles 1–5 and a blank (0), find the minimum number of swaps of 0 with its 4-directional neighbors to…
Companies: Amazon, Microsoft
Last reported Oct 2025
Companies: Anthropic
Concurrency · Graphs
Last reported Oct 2025
Compute the minimum seconds to type a given word on a circular typewriter (letters 'a'–'z') with the pointer starting at 'a', where moving one step…
Companies: JPMorgan Chase
Last reported Oct 2025
Design and implement a task queue system that can accept, store, and process tasks in a first-in-first-out manner. The implementation should support basic operations like…
Companies: Uber
Last reported Oct 2025
Companies: OpenAI
Graphs · Grids & Matrices
Last reported Oct 2025