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
30 questions
- 1Top k frequent elementsMediumCoding·
Amazon, Apple - 23Sum ClosestMediumCoding·
Apple, Kotak - 3Group anagramsMediumCoding·
Blinkit, MakeMyTrip - 4Minimum Height TreesMediumCoding·
Apple, UrbanCompany - 5Product of Array Except SelfMediumCoding·
PayPal, Target - 6Course ScheduleMediumCoding·
Zoho - 7Given the root of a binary tree of integers, return the maximum path sum.MediumCoding·
Adobe, Apple - 8Print all combinations of numbers from 1 to n that sum to n.MediumCoding·
Adobe, Apple - 9Find the container with the maximum volume of water.MediumCoding·
Apple, Goldman Sachs - 10Design an indexer and a retrieverMediumCoding·
Apple - 11Explain the differences between stack and heap memory allocation.MediumCoding·
Apple, Microsoft - 12Given 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 - 13Given 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 - 14Implement TrieMediumCoding·
Apple, Goldman Sachs - 15PermutationsMediumCoding·
Adobe, Apple - 16Find the longest palindromic subsequence using dynamic programming.MediumCoding·
Adobe, Apple - 17Find the longest substring without repeating characters.MediumCoding·
Apple, Intuit - 18Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding·
Apple, LinkedIn - 19Maximum Number of Visible PointsMediumCoding·
Apple - 20Find the maximum subarray sum.MediumCoding·
Adobe, Apple - 21Partition an array into two sub-arrays with equal sum.MediumCoding·
Apple, LinkedIn - 22Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?MediumCoding·
Adobe, Apple - 23Build a CalculatorMediumCoding·
Adobe, Apple - 24Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding·
Adobe, Apple