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

13 questions

  1. 1Merge IntervalsMediumCoding· Blinkit, Docquity Holdings(PBS)
  2. 2Print all combinations of numbers from 1 to n that sum to n.MediumCoding· Adobe, Apple
  3. 3Find the k-th smallest and k-th largest element in a binary search tree (BST).MediumCodingTechnical· LinkedIn
  4. 4PermutationsMediumCoding· Adobe, Apple
  5. 5Find the longest palindromic subsequence using dynamic programming.MediumCoding· Adobe, Apple
  6. 6Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding· Apple, LinkedIn
  7. 7Find the maximum subarray sum.MediumCoding· Adobe, Apple
  8. 8Partition an array into two sub-arrays with equal sum.MediumCoding· Apple, LinkedIn
  9. 9Sort an array containing only 0s, 1s, and 2s.MediumCodingTechnical· LinkedIn
  10. 10Construct a binary tree from an ancestor matrix.MediumCodingTechnical· LinkedIn
  11. 11Given an array of points and a point P, find the k closest points to P.MediumCoding· Amazon, LinkedIn
  12. 12Given an array of integers, find a tuple of three integers that can form a triangle.MediumCoding· LinkedIn
  13. 13Given an nxn grid of 1s and 0s, return the number of islands in the input.MediumCoding· Adobe, Amazon