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
- 865Given a list of sentences, find the top n most frequent words.MediumCoding·
Microsoft - 866Print the top view of nodes in a binary tree.MediumCoding·
Amazon - 867Transform a flat array of objects into a nested list.MediumCoding·
New York Times - 868Calculate the trapped rainwater between bars in a given array.HardCoding·
Adobe, Amazon - 869Given a string s, return true if the s can be a palindrome after deleting at most one character from it.MediumCoding·
Meta - 870If 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 - 871Find all permutations of a given string.MediumCoding·
Amazon - 872Calculate the average distance between cities.MediumCodingProduct·
Waymo - 873Find the first common ancestor of two nodes in a binary tree.MediumCoding·
Meta - 874How would you sort a bitonic array efficiently?MediumCoding·
Oracle - 875Given a bookstore database schema, write SQL queries using joins and aggregations to answer questions about sales, inventory, and customer data.MediumCodingData·
Meta - 876Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?MediumCoding·
Adobe, Apple - 877Calculate the height of a binary tree.EasyCoding·
Apple, Google - 878Calculate the number of times a pattern appears in a string.HardCoding·
LinkedIn - 879Calculate Test ScoresMediumCodingData·
Google - 880Build a CalculatorMediumCoding·
Adobe, Apple - 881Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding·
Adobe, Apple - 882Find the closest number in a sorted array.MediumCoding·
DoorDash - 883Given an array of points on a plane (x,y), write a function to return the distance between the closest pair of points.HardCoding·
Visa - 884Given an array of integers, return the pairs with the minimum absolute difference between them.MediumCoding·
Microsoft - 885Given an integer, reverse it. Integers are within range [-2^15, 2^15 - 1].MediumCoding·
Microsoft - 886Coin ChangeMediumCodingTechnical·
Apple, Citi - 887Construct a binary tree from an ancestor matrix.MediumCodingTechnical·
LinkedIn - 888Construct a binary tree given its preorder and inorder traversals.MediumCoding·
Adobe, Amazon