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. 1Bomb EnemyCoding· Uber
  2. 2Course Schedule IICoding· Atlassian, Flipkart
  3. 3Paint HouseCoding· Uber
  4. 4Print all nodes at a distance of K in BTCoding· Amazon, Uber
  5. 5Rotten OrangesCoding· Amazon, Informatica
  6. 6BFS AlgorithmCoding· Uber
  7. 7Count Subarrays With Fixed BoundsHardCoding· Uber
  8. 8Dynamic Programming ProblemCoding· Uber
  9. 9Find the Largest Palindrome Divisible by KHardCoding· Uber
  10. 10Find the next closest largest palindrome of a given numberCoding· Uber
  11. 11Find the Number of Ways to Place People IIHardCoding· Uber
  12. 12Finding the Next Closest PalindromeCoding· MMaersk, Uber
  13. 13First non-repeating character in a stream of dataCoding· Uber
  14. 14Graph Based ProblemCoding· Uber
  15. 15Kth Smallest Element in an ArrayCoding· Intuit, Microsoft
  16. 16Minimum Cost to travel in a GridCoding· Uber
  17. 17Most Profitable Path in a TreeMediumCoding· Uber
  18. 18Rearrange positive and negative numbersCoding· Uber
  19. 19Reservation SystemCoding· Uber
  20. 20Strictly Palindromic NumberMediumCoding· Uber
  21. 21Balanced TreeMediumCoding· Spotify, Uber
  22. 22Build a hit counter that tracks the number of hits in the last 5 minutes, supporting multiple keys (e.g., “a”, “b”). Then, use this counter to implement a simple rate limiter.MediumCoding· Uber
  23. 23Design a rewarding system.MediumCoding· Uber
  24. 24Given an array of integers and a number N, find the length of the longest contiguous subarray such that the difference between any two elements in the subarray is less than N.MediumCoding· Uber