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
37 questions
- 25Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?MediumCoding·
Adobe, Apple - 26Build a CalculatorMediumCoding·
Adobe, Apple - 27Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding·
Adobe, Apple - 28Construct a binary tree given its preorder and inorder traversals.MediumCoding·
Adobe, Amazon - 29Determine if a given binary tree is a binary search tree (BST).MediumCoding·
Adobe, Google - 30Edit distanceHardCoding·
Adobe, Amazon - 31Fibonacci NumbersEasyCoding·
Adobe, Google - 32Given an array, find the two sum.EasyCoding·
Adobe, Amazon - 33Given an nxn grid of 1s and 0s, return the number of islands in the input.MediumCoding·
Adobe, Amazon - 34Write a function to return all prime numbers up to a given number n.MediumCoding·
Adobe, Apple - 35Reverse a SentenceEasyCoding·
Adobe, Apple - 36Reverse a linked list.EasyCoding·
Adobe, Apple - 37Is this a valid palindrome?EasyCoding·
Adobe, Apple