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

46 questions

  1. 1Merge IntervalsMediumCoding· Blinkit, Docquity Holdings(PBS)
  2. 2Merge two sorted listsEasyCoding· Intuit, Oracle
  3. 3Top k frequent elementsMediumCoding· Amazon, Apple
  4. 4Product of Array Except SelfMediumCoding· PayPal, Target
  5. 5Sort a K-Messed ArrayMediumCoding· Meta
  6. 6Write a function to balance parentheses in a given string by removing the fewest characters possible. Ensure that each opening parenthesis has a corresponding closing parenthesis and each pair is properly nested.MediumCoding· Meta
  7. 7Given a string with parentheses, write a function that removes the minimum number of characters to balance the parentheses.MediumCoding· Meta
  8. 8Given a binary tree, check if each node is the average of all descendantsMediumCoding· Meta
  9. 9Given the root of a binary tree, return the length of the diameter of the tree.MediumCoding· Amazon, Google
  10. 10Given a collection of rooms where Alibada is in one and moves one room a day to an adjacent room, write a program to determine if you can find Alibada with the given list of rooms.MediumCoding· Meta
  11. 11Given an array of integers and an integer k, find the kth largest element in the array.MediumCoding· Meta, Microsoft
  12. 12Find the equilibrium index in an array where sum of elements to the left is equal to sum of elements to the right.MediumCoding· Meta
  13. 13Given a list of strings, find all strings that encode to the same value using a Caesar Cipher. (A Caesar Cipher rotates characters, e.g. in CC3: a->d, b->e, ..., z->c)MediumCoding· Meta, Pinterest
  14. 14Explain how to find a target sum in an array.MediumCoding· Adobe, Google
  15. 15Generate ParenthesesMediumCoding· Adobe, Google
  16. 16Implement a circular buffer.MediumCoding· Meta
  17. 17Implement the memcpy() function in C.MediumCoding· Meta
  18. 18Implement TrieMediumCoding· Apple, Goldman Sachs
  19. 19Find the largest perimeter of an island given a two-dimensional array of 1's and 0's representing land and water.MediumCoding· Bloomberg, Meta
  20. 20Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding· Apple, LinkedIn
  21. 21Implement LRU Cache.HardCoding· Accenture, Adobe
  22. 22Merge k sorted linked lists.HardCoding· Adobe, Apple
  23. 23Move all zeros to the end of an array.EasyCoding· Adobe, Amazon
  24. 24Partition an array into two sub-arrays with equal sum.MediumCoding· Apple, LinkedIn