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
65 questions
- 25Design an indexer and a retrieverMediumCoding·
Apple - 26Explain the differences between stack and heap memory allocation.MediumCoding·
Apple, Microsoft - 27Given an array with objects colored red, white, or blue, sort them so those of the same color are adjacent. Use integers 0, 1, 2 to represent RWB respectively.MediumCoding·
Apple - 28Find the DuplicatesEasyCoding·
Adobe, Apple - 29Given 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 - 30Implement TrieMediumCoding·
Apple, Goldman Sachs - 31PermutationsMediumCoding·
Adobe, Apple - 32Find the longest palindromic subsequence using dynamic programming.MediumCoding·
Adobe, Apple - 33Find the longest substring without repeating characters.MediumCoding·
Apple, Intuit - 34Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding·
Apple, LinkedIn - 35Implement LRU Cache.HardCoding·
Accenture, Adobe - 36Maximum Number of Visible PointsMediumCoding·
Apple - 37Find the maximum subarray sum.MediumCoding·
Adobe, Apple - 38Merge k sorted linked lists.HardCoding·
Adobe, Apple - 39Move all zeros to the end of an array.EasyCoding·
Adobe, Amazon - 40Partition an array into two sub-arrays with equal sum.MediumCoding·
Apple, LinkedIn - 41Sort a binary array in linear time.EasyCoding·
Accenture, Apple - 42Given an integer array nums and an integer k, return true if nums has a subarray of at least two elements whose sum is a multiple of k.HardCoding·
Adobe, Apple - 43Sudoku SolverHardCoding·
Adobe, Apple - 44Calculate the trapped rainwater between bars in a given array.HardCoding·
Adobe, Amazon - 45Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?MediumCoding·
Adobe, Apple - 46Calculate the height of a binary tree.EasyCoding·
Apple, Google - 47Build a CalculatorMediumCoding·
Adobe, Apple - 48Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding·
Adobe, Apple