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

50 questions

  1. 1Merge IntervalsMediumCoding· Blinkit, Docquity Holdings(PBS)
  2. 2Top k frequent elementsMediumCoding· Amazon, Apple
  3. 3Word BreakMediumCoding· Meta, ServiceNow
  4. 4Array NestingMediumCoding· Meta
  5. 5Binary Tree Right Side ViewMediumCoding· Meta
  6. 6Boats to Save PeopleMediumCoding· IDFC FIRST Bank, Meta
  7. 7Check if a Parentheses String Can Be ValidMediumCoding· Meta, ServiceNow
  8. 8Longest Increasing SubsequenceMediumCodingAI ML· Atlassian, Meta
  9. 9Count Subarrays Where Max Element Appears at Least K TimesMediumCoding· Meta
  10. 10Minimum Remove to Make Valid ParenthesesMediumCoding· Meta
  11. 11Product of Array Except SelfMediumCoding· PayPal, Target
  12. 12Sort a K-Messed ArrayMediumCoding· Meta
  13. 13Sum Root to Leaf NumbersMediumCoding· BitGo, Meta
  14. 14Write 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
  15. 15Given a string with parentheses, write a function that removes the minimum number of characters to balance the parentheses.MediumCoding· Meta
  16. 16Given a binary tree, check if each node is the average of all descendantsMediumCoding· Meta
  17. 17Given the root of a binary tree, return the length of the diameter of the tree.MediumCoding· Amazon, Google
  18. 18Write a function that takes an array of integers and checks for duplicate values in any contiguous window of size N.MediumCoding· Meta
  19. 19Given 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
  20. 20Given an array of integers and an integer k, find the kth largest element in the array.MediumCoding· Meta, Microsoft
  21. 21Find a local minima in an array Last UpdatedMediumCoding· Meta
  22. 22Find the equilibrium index in an array where sum of elements to the left is equal to sum of elements to the right.MediumCoding· Meta
  23. 23Given 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
  24. 24Explain how to find a target sum in an array.MediumCoding· Adobe, Google