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

56 questions

  1. 25Longest Cycle in a GraphHardCoding· Goldman Sachs
  2. 26MatrixCoding· Goldman Sachs, Swiggy
  3. 27Maximize Amount After Two Days of ConversionsMediumCoding· Goldman Sachs
  4. 28Maximum number of coinsCoding· Goldman Sachs
  5. 29Maximum Number of Jumps to Reach the Last IndexMediumCoding· Goldman Sachs
  6. 30Merge two sorted arrays without extra spaceCoding· Goldman Sachs
  7. 31Minimum insertions to make string palindromeCoding· Goldman Sachs, Oracle
  8. 32Minimum-length substringCoding· Goldman Sachs
  9. 33Minimum Steps to Reach a Target with Variable JumpsCoding· Goldman Sachs, Zeta
  10. 34Peak Index in a Mountain ArrayMediumCoding· Goldman Sachs
  11. 35Shortest Subarray to be Removed to Make Array SortedMediumCoding· Goldman Sachs
  12. 36Sort Characters by FrequencyCoding· Goldman Sachs
  13. 37Stack monotonicCoding· Goldman Sachs
  14. 38Unique SubstringsCoding· Goldman Sachs
  15. 39Given the root of a binary tree of integers, return the maximum path sum.MediumCoding· Adobe, Apple
  16. 40Find the container with the maximum volume of water.MediumCoding· Apple, Goldman Sachs
  17. 41Implement a hashmap without using any libraries.HardCoding· Apple, Goldman Sachs
  18. 42Explain the differences between an interface and an abstract class.MediumCodingTechnical· Goldman Sachs, Microsoft
  19. 43Find a triplet in an array with a given sum.MediumCoding· Adobe, Goldman Sachs
  20. 44Given n houses in a line with money in each, find the maximum amount a robber can steal, without stealing from two adjacent houses.MediumCoding· Adobe, Apple
  21. 45Implement TrieMediumCoding· Apple, Goldman Sachs
  22. 46Find the longest palindromic subsequence using dynamic programming.MediumCoding· Adobe, Apple
  23. 47Implement LRU Cache.HardCoding· Accenture, Adobe
  24. 48Given an integer array nums and an integer k, return true if nums has a subarray of at least two elements whose sum is a multiple of k.HardCoding· Adobe, Apple