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

28 questions

  1. 1Accounts mergeMediumCoding· Google
  2. 2Merge IntervalsMediumCoding· Blinkit, Docquity Holdings(PBS)
  3. 3Partition equal subset sumMediumCoding· Google
  4. 4Detonate the Maximum BombsMediumCoding· Google
  5. 5Find Three Consecutive Integers That Sum to a Given NumberMediumCoding· Google
  6. 6Product of the Last K NumbersMediumCoding· Google
  7. 7Given 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
  8. 8Given the root of a binary tree, return the length of the diameter of the tree.MediumCoding· Amazon, Google
  9. 9Given a list with response time for each server, calculate how long time it will take to process n requests.MediumCoding· Google
  10. 10Sort a list of natural numbers and their squares in the most efficient way possible.MediumCoding· Google
  11. 11Explain malloc, calloc, and reelloc.MediumCodingTechnical· Google
  12. 12Explain how to find a target sum in an array.MediumCoding· Adobe, Google
  13. 13Generate ParenthesesMediumCoding· Adobe, Google
  14. 14Sort a nearly sorted (or K sorted) array.MediumCoding· Google
  15. 15PermutationsMediumCoding· Adobe, Apple
  16. 16Find the longest palindromic subsequence using dynamic programming.MediumCoding· Adobe, Apple
  17. 17Find the maximum subarray sum.MediumCoding· Adobe, Apple
  18. 18Given 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
  19. 19Write functions to serialize and deserialize a list of strings.MediumCoding· Google, Nvidia
  20. 20Calculate Test ScoresMediumCodingData· Google
  21. 21Construct a binary tree given its preorder and inorder traversals.MediumCoding· Adobe, Amazon
  22. 22Implement a decode and encode function of a general N-ary tree.MediumCoding· Google
  23. 23Design a task scheduler in Python.MediumCoding· Google, OpenAI
  24. 24Determine if a given binary tree is a binary search tree (BST).MediumCoding· Adobe, Google