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

1,063 questions

  1. 817Design and implement an in-memory key-value store that supports set, transactional begin, commit, and abort operations.HardCoding· OpenAI, xAI
  2. 818Implement the memcpy() function in C.MediumCoding· Meta
  3. 819Implement merge-sortMediumCoding· Walmart Labs
  4. 820Implement a phrase search in a list of documents.MediumCoding· Amazon, Confluent
  5. 821Implement a string sorting algorithm, treating digits as numbers.MediumCoding· Bolt
  6. 822Implement TrieMediumCoding· Apple, Goldman Sachs
  7. 823Implement 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. 824You're given a time-based key-value store that keeps having new key-value pairs added. Implement a windowed average.MediumCoding· Confluent
  9. 825Sort a nearly sorted (or K sorted) array.MediumCoding· Google
  10. 826Find the k-th smallest and k-th largest element in a binary search tree (BST).MediumCodingTechnical· LinkedIn
  11. 827Find 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. 828PermutationsMediumCoding· Adobe, Apple
  13. 829Lexicographic Grid Travel.MediumCoding· Databricks
  14. 830Given 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. 831Find the longest palindromic subsequence using dynamic programming.MediumCoding· Adobe, Apple
  16. 832Find the longest substring without repeating characters.MediumCoding· Apple, Intuit
  17. 833Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding· Apple, LinkedIn
  18. 834Implement LRU Cache.HardCoding· Accenture, Adobe
  19. 835A 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. 836Maximum Number of Visible PointsMediumCoding· Apple
  21. 837Find the maximum product of any two integers in an array.MediumCoding· Amazon
  22. 838Maximum ProfitEasyCoding· Google
  23. 839Find the maximum possible stability of any subset of servers. Return the result modulo 10^9+7. E.g. Consider set of servers where reliability = [1, 2, 2], availability = [1, 1, 3].MediumCoding· Amazon
  24. 840Find the maximum subarray sum.MediumCoding· Adobe, Apple