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
155 questions
- 73Transform a flat array of objects into a nested list.MediumCoding·
New York Times - 74Given a string s, return true if the s can be a palindrome after deleting at most one character from it.MediumCoding·
Meta - 75Vertical Traversal of a Binary TreeMediumCoding·
Meta, Oracle - 76If given two strings, each containing a number larger than 32-bit, how do you add them and return the result as a string?MediumCodingTechnical·
Waymo - 77Find all permutations of a given string.MediumCoding·
Amazon - 78Calculate the average distance between cities.MediumCodingProduct·
Waymo - 79Find the first common ancestor of two nodes in a binary tree.MediumCoding·
Meta - 80How would you sort a bitonic array efficiently?MediumCoding·
Oracle - 81Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?MediumCoding·
Adobe, Apple - 82Build a CalculatorMediumCoding·
Adobe, Apple - 83Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding·
Adobe, Apple - 84How would you implement a child-parent relation for finding the Least Common Ancestor (LCA) without using pointers?MediumCoding·
Samsung - 85Find the closest number in a sorted array.MediumCoding·
DoorDash - 86Given an array of integers, return the pairs with the minimum absolute difference between them.MediumCoding·
Microsoft - 87Given an integer, reverse it. Integers are within range [-2^15, 2^15 - 1].MediumCoding·
Microsoft - 88Construct a binary tree from an ancestor matrix.MediumCodingTechnical·
LinkedIn - 89Construct a binary tree given its preorder and inorder traversals.MediumCoding·
Adobe, Amazon - 90Given a string, return the number of vowel substrings ('a', 'e', 'i', 'o', 'u') that include all five vowels.MediumCoding·
Oracle - 91Design a data structure that supports insert, delete, search, and retrieve in constant time.MediumCoding·
Meta - 92If you have a vector with many values, mostly zeroes, how would you design a data structure to represent it?MediumCodingTechnical· WWhatsApp
- 93Design LFU cache.MediumCodingSystem design·
Microsoft - 94Design a queue using static memory allocation.MediumCoding·
Intuit - 95Design a task scheduler in Python.MediumCoding·
Google, OpenAI - 96Detect cycle in graphMediumCoding·
Amazon