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

205 questions

  1. 49Implement file searchMediumCoding· Amazon
  2. 50Implement the memcpy() function in C.MediumCoding· Meta
  3. 51Implement merge-sortMediumCoding· Walmart Labs
  4. 52Implement a phrase search in a list of documents.MediumCoding· Amazon, Confluent
  5. 53Implement a string sorting algorithm, treating digits as numbers.MediumCoding· Bolt
  6. 54Implement TrieMediumCoding· Apple, Goldman Sachs
  7. 55Implement 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
  8. 56You're given a time-based key-value store that keeps having new key-value pairs added. Implement a windowed average.MediumCoding· Confluent
  9. 57Sort a nearly sorted (or K sorted) array.MediumCoding· Google
  10. 58Find the k-th smallest and k-th largest element in a binary search tree (BST).MediumCodingTechnical· LinkedIn
  11. 59Find the largest perimeter of an island given a two-dimensional array of 1's and 0's representing land and water.MediumCoding· Bloomberg, Meta
  12. 60PermutationsMediumCoding· Adobe, Apple
  13. 61Lexicographic Grid Travel.MediumCoding· Databricks
  14. 62Given 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
  15. 63Find the longest palindromic subsequence using dynamic programming.MediumCoding· Adobe, Apple
  16. 64Find the longest substring without repeating characters.MediumCoding· Apple, Intuit
  17. 65Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding· Apple, LinkedIn
  18. 66Implement LRU Cache.HardCoding· Accenture, Adobe
  19. 67A knapsack has a maximum capacity C and there are n items each with weight w[i] and value v[i]. Maximize the knapsack value without exceeding capacity.MediumCodingTechnical· Uber
  20. 68Maximum Number of Visible PointsMediumCoding· Apple
  21. 69Find the maximum product of any two integers in an array.MediumCoding· Amazon
  22. 70Maximum ProfitEasyCoding· Google
  23. 71Find the maximum subarray sum.MediumCoding· Adobe, Apple
  24. 72Merge k sorted linked lists.HardCoding· Adobe, Apple