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

239 questions

  1. 25Lowest Common Ancestor of a Binary Tree IVCoding· J.P. Morgan, Microsoft
  2. 26Max Consecutive Ones IICoding· Microsoft
  3. 27Maximum Product Subarray in an ArrayCoding· Cisco Meraki, Microsoft
  4. 28Number of Connected Components in an Undirected GraphCoding· Goldman Sachs, Microsoft
  5. 29Palindrome RemovalCoding· Microsoft
  6. 30Reachable Nodes Before DestructionCoding· Microsoft
  7. 31Rod cutting problemCoding· Microsoft
  8. 32Rotten OrangesCoding· Amazon, Informatica
  9. 33Single element in sorted arrayCoding· Microsoft
  10. 34Sort an array of 0's 1's and 2'sCoding· Microsoft, Nvidia
  11. 35Subarrays with K Different IntegersHardCoding· HHashedIn, Microsoft
  12. 36Top k frequent elementsMediumCoding· Amazon, Apple
  13. 37Topological sort or Kahn's algorithmCoding· Amazon, Microsoft
  14. 38ArrayCoding· J.P. Morgan, Microsoft
  15. 39BacktrackingCoding· Microsoft
  16. 40Binary Search and HeapsCoding· Microsoft
  17. 41Binary Tree Maximum Path SumHardCoding· Qualcomm, DoorDash
  18. 42Bottom View of a Binary TreeCoding· Microsoft
  19. 43Count Ways to Distribute CandiesCoding· Microsoft
  20. 44Cycle Length Queries in a TreeHardCoding· Microsoft
  21. 45Design Video Sharing PlatformHardCoding· Microsoft
  22. 46Encode and Decode StringsCoding· Amazon, Microsoft
  23. 47Extra Characters in a StringMediumCoding· Microsoft
  24. 48Find Pivot IndexEasyCoding· Microsoft