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

29 questions

  1. 1LRU CacheMediumCoding· Adobe, Amazon
  2. 2Top k frequent elementsMediumCoding· Amazon, Apple
  3. 3All Elements in Two Binary Search TreesMediumCoding· Adobe
  4. 4Compare Version NumbersMediumCoding· Adobe
  5. 5Friends Of Appropriate AgesMediumCoding· Adobe
  6. 6Group anagramsMediumCoding· Blinkit, MakeMyTrip
  7. 7Kth Smallest Element in a Sorted MatrixMediumCoding· Adobe
  8. 8Nested List Weight SumMediumCoding· Adobe
  9. 9Product of Array Except SelfMediumCoding· PayPal, Target
  10. 10Rotate ArrayMediumCoding· Adobe
  11. 11Subarray Product Less Than KMediumCoding· Adobe, Flexport
  12. 1201 Matrix: find the nearest zero for every cellMediumCoding· Adobe, Oracle
  13. 13Given the root of a binary tree of integers, return the maximum path sum.MediumCoding· Adobe, Apple
  14. 14Print all combinations of numbers from 1 to n that sum to n.MediumCoding· Adobe, Apple
  15. 15Cycle Detection in Package Manager.MediumCoding· Adobe
  16. 16Explain how to find a target sum in an array.MediumCoding· Adobe, Google
  17. 17Find a triplet in an array with a given sum.MediumCoding· Adobe, Goldman Sachs
  18. 18Generate ParenthesesMediumCoding· Adobe, Google
  19. 19Given 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
  20. 20PermutationsMediumCoding· Adobe, Apple
  21. 21Find the longest palindromic subsequence using dynamic programming.MediumCoding· Adobe, Apple
  22. 22Find the maximum subarray sum.MediumCoding· Adobe, Apple
  23. 23Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?MediumCoding· Adobe, Apple
  24. 24Build a CalculatorMediumCoding· Adobe, Apple