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
343 questions
- 241Design a queue using static memory allocation.MediumCoding·
Intuit - 242Design a task scheduler in Python.MediumCoding·
Google, OpenAI - 243Detect cycle in graphMediumCoding·
Amazon - 244Determine if a given binary tree is a binary search tree (BST).MediumCoding·
Adobe, Google - 245How can you tell if a graph is not a tree?MediumCodingTechnical·
Amazon - 246Given a list of integers, return 1 if the integer is a power of 2 and 0 if it is not.MediumCoding·
Snap - 247Determine if two sentences are similar.MediumCodingTechnical·
Google - 248Explain callback functions.MediumCodingTechnical·
Nvidia - 249Explain the filter function.MediumCoding·
Apple - 250Explain multithreading.MediumCoding·
Microsoft, Nvidia - 251Given 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 - 252Find the closest palindrome of a given number.MediumCoding·
Uber - 253Find duplicate files in a file system.MediumCodingTechnical·
Anthropic, Dropbox - 254Find 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 - 255Given an array of points and a point P, find the k closest points to P.MediumCoding·
Amazon, LinkedIn - 256Find Largest NumbersMediumCoding·
Accenture, Goldman Sachs - 257Given 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 - 258Find the number of rotations in a circularly sorted array.MediumCoding·
AMD, Microsoft - 259Given a binary matrix with every row sorted, find the index of the row containing the most number of 1s.MediumCoding·
Amazon - 260Find the shortest path in a graph.MediumCodingTechnical·
Amazon - 261Given 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 - 262Find the maximum subarray productMediumCoding·
LinkedIn - 263Given an array of integers, find a tuple of three integers that can form a triangle.MediumCoding·
LinkedIn - 264Implement a function to justify a list of words within a given width.MediumCoding·
Google, Microsoft