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
21 questions
- 1Top k frequent elementsMediumCoding·
Amazon, Apple - 2Group anagramsMediumCoding·
Blinkit, MakeMyTrip - 3Product of Array Except SelfMediumCoding·
PayPal, Target - 401 Matrix: find the nearest zero for every cellMediumCoding·
Adobe, Oracle - 5Given the root of a binary tree of integers, return the maximum path sum.MediumCoding·
Adobe, Apple - 6Print all combinations of numbers from 1 to n that sum to n.MediumCoding·
Adobe, Apple - 7Cycle Detection in Package Manager.MediumCoding·
Adobe - 8Explain how to find a target sum in an array.MediumCoding·
Adobe, Google - 9Find a triplet in an array with a given sum.MediumCoding·
Adobe, Goldman Sachs - 10Generate ParenthesesMediumCoding·
Adobe, Google - 11Given n houses in a line with money in each, find the maximum amount a robber can steal, without stealing from two adjacent houses.MediumCoding·
Adobe, Apple - 12PermutationsMediumCoding·
Adobe, Apple - 13Find the longest palindromic subsequence using dynamic programming.MediumCoding·
Adobe, Apple - 14Find the maximum subarray sum.MediumCoding·
Adobe, Apple - 15Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?MediumCoding·
Adobe, Apple - 16Build a CalculatorMediumCoding·
Adobe, Apple - 17Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding·
Adobe, Apple - 18Construct a binary tree given its preorder and inorder traversals.MediumCoding·
Adobe, Amazon - 19Determine if a given binary tree is a binary search tree (BST).MediumCoding·
Adobe, Google - 20Given an nxn grid of 1s and 0s, return the number of islands in the input.MediumCoding·
Adobe, Amazon - 21Write a function to return all prime numbers up to a given number n.MediumCoding·
Adobe, Apple