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

28 questions

  1. 1Asteroid CollisionMediumCoding· Amazon, Microsoft
  2. 2Koko eating bananas.MediumCoding· Flipkart, Amazon
  3. 3Top k frequent elementsMediumCoding· Amazon, Apple
  4. 4Extra Characters in a StringMediumCoding· Microsoft
  5. 5Find the Winner of an Array GameMediumCoding· Microsoft
  6. 6Largest NumberMediumCoding· Microsoft
  7. 7Longest Consecutive SequenceMediumCoding· Amazon, Microsoft
  8. 8Most Profit Assigning WorkMediumCoding· Microsoft
  9. 9Product of Array Except SelfMediumCoding· PayPal, Target
  10. 10Reorder ListMediumCoding· Microsoft
  11. 11Given an array of integers and an integer k, find the kth largest element in the array.MediumCoding· Meta, Microsoft
  12. 12Given two empty jugs with capacities a and b liters and an infinite water supply, determine a way to end up with exactly X liters of water.MediumCoding· Microsoft
  13. 13Delete Node in a Binary Search Tree (BST).MediumCoding· Microsoft
  14. 14Explain the differences between an interface and an abstract class.MediumCodingTechnical· Goldman Sachs, Microsoft
  15. 15Explain the differences between stack and heap memory allocation.MediumCoding· Apple, Microsoft
  16. 16Find the longest substring without repeating characters.MediumCoding· Apple, Intuit
  17. 17Print all words from a dictionary that can be found on a given Boggle board.MediumCoding· Microsoft
  18. 18How would you store a list of numbers as a single number?MediumCodingTechnical· Atlassian, Microsoft
  19. 19Given a list of sentences, find the top n most frequent words.MediumCoding· Microsoft
  20. 20Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding· Adobe, Apple
  21. 21Given an array of integers, return the pairs with the minimum absolute difference between them.MediumCoding· Microsoft
  22. 22Given an integer, reverse it. Integers are within range [-2^15, 2^15 - 1].MediumCoding· Microsoft
  23. 23Construct a binary tree given its preorder and inorder traversals.MediumCoding· Adobe, Amazon
  24. 24Design LFU cache.MediumCodingSystem design· Microsoft