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

26 questions

  1. 1LRU CacheMediumCoding· Adobe, Amazon
  2. 2Merge IntervalsMediumCoding· Blinkit, Docquity Holdings(PBS)
  3. 3Merge two sorted listsEasyCoding· Intuit, Oracle
  4. 4Sliding Window MaximumHardCoding· BharatPe, Cisco Meraki
  5. 5Print all combinations of numbers from 1 to n that sum to n.MediumCoding· Adobe, Apple
  6. 6Find the k-th smallest and k-th largest element in a binary search tree (BST).MediumCodingTechnical· LinkedIn
  7. 7PermutationsMediumCoding· Adobe, Apple
  8. 8Find the longest palindromic subsequence using dynamic programming.MediumCoding· Adobe, Apple
  9. 9Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding· Apple, LinkedIn
  10. 10Implement LRU Cache.HardCoding· Accenture, Adobe
  11. 11Find the maximum subarray sum.MediumCoding· Adobe, Apple
  12. 12Merge k sorted linked lists.HardCoding· Adobe, Apple
  13. 13Partition an array into two sub-arrays with equal sum.MediumCoding· Apple, LinkedIn
  14. 14Sort an array containing only 0s, 1s, and 2s.MediumCodingTechnical· LinkedIn
  15. 15Calculate the height of a binary tree.EasyCoding· Apple, Google
  16. 16Calculate the number of times a pattern appears in a string.HardCoding· LinkedIn
  17. 17Construct a binary tree from an ancestor matrix.MediumCodingTechnical· LinkedIn
  18. 18Design and implement a ranked cache system.MediumCodingSystem design· LinkedIn
  19. 19Edit distanceHardCoding· Adobe, Amazon
  20. 20Given an array of points and a point P, find the k closest points to P.MediumCoding· Amazon, LinkedIn
  21. 21Find the maximum subarray productMediumCoding· LinkedIn
  22. 22Given an array of integers, find a tuple of three integers that can form a triangle.MediumCoding· LinkedIn
  23. 23Monthly Post Success Analysis.EasyCodingData· LinkedIn
  24. 24Given an nxn grid of 1s and 0s, return the number of islands in the input.MediumCoding· Adobe, Amazon