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

155 questions

  1. 25Cycle Detection in Package Manager.MediumCoding· Adobe
  2. 26Explain how to design and implement a password checker based on specific requirements.MediumCodingTechnical· Peloton
  3. 27Design an indexer and a retrieverMediumCoding· Apple
  4. 28Sort a list of natural numbers and their squares in the most efficient way possible.MediumCoding· Google
  5. 29Explain the differences between stack and heap memory allocation.MediumCoding· Apple, Microsoft
  6. 30Given 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
  7. 31Find the equilibrium index in an array where sum of elements to the left is equal to sum of elements to the right.MediumCoding· Meta
  8. 32Find the median from a data stream.MediumCoding· Bloomberg
  9. 33Given a list of strings, find all strings that encode to the same value using a Caesar Cipher. (A Caesar Cipher rotates characters, e.g. in CC3: a->d, b->e, ..., z->c)MediumCoding· Meta, Pinterest
  10. 34Explain how to find a target sum in an array.MediumCoding· Adobe, Google
  11. 35Find a triplet in an array with a given sum.MediumCoding· Adobe, Goldman Sachs
  12. 36Generate ParenthesesMediumCoding· Adobe, Google
  13. 37Given 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
  14. 38Implement a circular buffer.MediumCoding· Meta
  15. 39Implement file searchMediumCoding· Amazon
  16. 40Implement the memcpy() function in C.MediumCoding· Meta
  17. 41Implement merge-sortMediumCoding· Walmart Labs
  18. 42Implement a phrase search in a list of documents.MediumCoding· Amazon, Confluent
  19. 43Implement a string sorting algorithm, treating digits as numbers.MediumCoding· Bolt
  20. 44Implement TrieMediumCoding· Apple, Goldman Sachs
  21. 45Implement wildcard pattern matching for a string (s) and a pattern (p) with '?' and '*' in a way that covers the entire input string.MediumCoding· Service Now
  22. 46You're given a time-based key-value store that keeps having new key-value pairs added. Implement a windowed average.MediumCoding· Confluent
  23. 47Sort a nearly sorted (or K sorted) array.MediumCoding· Google
  24. 48Find the k-th smallest and k-th largest element in a binary search tree (BST).MediumCodingTechnical· LinkedIn