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

17 questions

  1. 1Koko eating bananas.MediumCoding· Flipkart, Amazon
  2. 2Top k frequent elementsMediumCoding· Amazon, Apple
  3. 3Product of Array Except SelfMediumCoding· PayPal, Target
  4. 4Given an array of integers and an integer k, find the kth largest element in the array.MediumCoding· Meta, Microsoft
  5. 5Given 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
  6. 6Explain the differences between stack and heap memory allocation.MediumCoding· Apple, Microsoft
  7. 7Find the longest substring without repeating characters.MediumCoding· Apple, Intuit
  8. 8Print all words from a dictionary that can be found on a given Boggle board.MediumCoding· Microsoft
  9. 9How would you store a list of numbers as a single number?MediumCodingTechnical· Atlassian, Microsoft
  10. 10Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding· Adobe, Apple
  11. 11Given an array of integers, return the pairs with the minimum absolute difference between them.MediumCoding· Microsoft
  12. 12Given an integer, reverse it. Integers are within range [-2^15, 2^15 - 1].MediumCoding· Microsoft
  13. 13Construct a binary tree given its preorder and inorder traversals.MediumCoding· Adobe, Amazon
  14. 14Design LFU cache.MediumCodingSystem design· Microsoft
  15. 15Explain multithreading.MediumCoding· Microsoft, Nvidia
  16. 16Find the number of rotations in a circularly sorted array.MediumCoding· AMD, Microsoft
  17. 17Implement a function to justify a list of words within a given width.MediumCoding· Google, Microsoft