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

18 questions

  1. 1Merge IntervalsMediumCoding· Blinkit, Docquity Holdings(PBS)
  2. 2Given a list of car rental requests with start and end times, assign cars to rentals such that the total number of cars used is minimized.MediumCoding· Google
  3. 3Given the root of a binary tree, return the length of the diameter of the tree.MediumCoding· Amazon, Google
  4. 4Sort a list of natural numbers and their squares in the most efficient way possible.MediumCoding· Google
  5. 5Explain how to find a target sum in an array.MediumCoding· Adobe, Google
  6. 6Generate ParenthesesMediumCoding· Adobe, Google
  7. 7Sort a nearly sorted (or K sorted) array.MediumCoding· Google
  8. 8PermutationsMediumCoding· Adobe, Apple
  9. 9Find the longest palindromic subsequence using dynamic programming.MediumCoding· Adobe, Apple
  10. 10Find the maximum subarray sum.MediumCoding· Adobe, Apple
  11. 11Given a large n-ary tree where the root node can pass information to one child per iteration, and in subsequent iterations, nodes can pass information to one child while the root continues with others, find the minimum number of iterations to reach all nodes.MediumCoding· Google
  12. 12Write functions to serialize and deserialize a list of strings.MediumCoding· Google, Nvidia
  13. 13Construct a binary tree given its preorder and inorder traversals.MediumCoding· Adobe, Amazon
  14. 14Design a task scheduler in Python.MediumCoding· Google, OpenAI
  15. 15Determine if a given binary tree is a binary search tree (BST).MediumCoding· Adobe, Google
  16. 16Determine if two sentences are similar.MediumCodingTechnical· Google
  17. 17Implement a function to justify a list of words within a given width.MediumCoding· Google, Microsoft
  18. 18Given positions of N kids and M ice cream sellers on a 1D line, find the smallest distance E such that every kid lies within the range [P - E, P + E] of at least one seller.MediumCoding· Google