Question bank
4,310 interview questions, answered.
Reference answers, what the interviewer is really testing, how it is graded, and the follow-ups that come next.
Easy 190Medium 2,498Hard 982
Filters · onDifficulty, topic, company
1,063 questions
- 913Explain the sort function.EasyCoding·
Apple - 914Given a factory represented as a 2D grid with some cells blocked and some containing robots, determine if the robots can collectively reach all unblocked cells.MediumCoding·
Amazon - 915Fibonacci NumbersEasyCoding·
Adobe, Google - 916Find the closest palindrome of a given number.MediumCoding·
Uber - 917Find duplicate files in a file system.MediumCodingTechnical·
Anthropic, Dropbox - 918Find the element at a given position in a sorted version of an unsorted array. Example: Input: {5,1,7,19,0,16}, k=3 Output: 5 (Explanation: Sorted array is {0,1,5,7,16,19}, and the 3rd positioned element is 5.)MediumCodingTechnical·
Philips - 919Given an array of points and a point P, find the k closest points to P.MediumCoding·
Amazon, LinkedIn - 920Find Largest NumbersMediumCoding·
Accenture, Goldman Sachs - 921Given a list of Nodes, each with a unique string id and a list of subnodes it depends on, find the maximum depth of the dependencies.MediumCoding·
Amazon - 922Given an array 'nums' with n distinct numbers in the range [0, n], return the only number in the range that is missing from the array.EasyCoding·
Accenture - 923Find Monthly Revenue GrowthHardCodingData·
Uber - 924Find the number of rotations in a circularly sorted array.MediumCoding·
AMD, Microsoft - 925Find the palindromes.EasyCoding·
Amazon, Apple - 926Find peak element in an arrayEasyCoding·
Apple - 927Given a binary matrix with every row sorted, find the index of the row containing the most number of 1s.MediumCoding·
Amazon - 928Find the shortest path in a graph.MediumCodingTechnical·
Amazon - 929Given an array of task durations (in minutes), return the pairs of tasks that can be completed within 60 minutes. For example, for [1, 43, 20, 59, 30, 30], return [[0, 3], [4, 5]].MediumCoding·
DoorDash - 930Find the maximum subarray productMediumCoding·
LinkedIn - 931Given an array of integers, find a tuple of three integers that can form a triangle.MediumCoding·
LinkedIn - 932Given an array, find the two sum.EasyCoding·
Adobe, Amazon - 933Given two strings of equal length, determine if it's possible to form a palindrome by cutting them in half.EasyCoding·
Google - 934Implement a function to justify a list of words within a given width.MediumCoding·
Google, Microsoft - 935Given a string that doesn't fit into a machine's memory, split it at each space and count the number of spaces.MediumCoding·
Apple - 936Given an array representing the height of buildings from a sea beach, return an array of heights of the buildings that have a sea view.MediumCoding·
Meta