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

51 questions

  1. 1Top k frequent elementsMediumCoding· Amazon, Apple
  2. 2Group anagramsMediumCoding· Blinkit, MakeMyTrip
  3. 3Linked List CycleEasyCoding· CCognitree
  4. 4Product of Array Except SelfMediumCoding· PayPal, Target
  5. 5Course ScheduleMediumCoding· Zoho
  6. 6Given the root of a binary tree of integers, return the maximum path sum.MediumCoding· Adobe, Apple
  7. 7Build a Basic Regex ParserHardCoding· Adobe, Apple
  8. 8Print all combinations of numbers from 1 to n that sum to n.MediumCoding· Adobe, Apple
  9. 9Find the container with the maximum volume of water.MediumCoding· Apple, Goldman Sachs
  10. 10Implement a hashmap without using any libraries.HardCoding· Apple, Goldman Sachs
  11. 11Design an indexer and a retrieverMediumCoding· Apple
  12. 12Explain the differences between stack and heap memory allocation.MediumCoding· Apple, Microsoft
  13. 13Given 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
  14. 14Find the DuplicatesEasyCoding· Adobe, Apple
  15. 15Given 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
  16. 16Implement TrieMediumCoding· Apple, Goldman Sachs
  17. 17PermutationsMediumCoding· Adobe, Apple
  18. 18Find the longest palindromic subsequence using dynamic programming.MediumCoding· Adobe, Apple
  19. 19Find the longest substring without repeating characters.MediumCoding· Apple, Intuit
  20. 20Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding· Apple, LinkedIn
  21. 21Implement LRU Cache.HardCoding· Accenture, Adobe
  22. 22Maximum Number of Visible PointsMediumCoding· Apple
  23. 23Find the maximum subarray sum.MediumCoding· Adobe, Apple
  24. 24Merge k sorted linked lists.HardCoding· Adobe, Apple