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

36 questions

  1. 25Given a factory represented as a 2D grid with some cells blocked and some containing robots, determine if the robots can collectively reach all unblocked cells.MediumCoding· Amazon
  2. 26Given an array of points and a point P, find the k closest points to P.MediumCoding· Amazon, LinkedIn
  3. 27Given a list of Nodes, each with a unique string id and a list of subnodes it depends on, find the maximum depth of the dependencies.MediumCoding· Amazon
  4. 28Find the palindromes.EasyCoding· Amazon, Apple
  5. 29Given a binary matrix with every row sorted, find the index of the row containing the most number of 1s.MediumCoding· Amazon
  6. 30Find the shortest path in a graph.MediumCodingTechnical· Amazon
  7. 31Given an array, find the two sum.EasyCoding· Adobe, Amazon
  8. 32Find the longest common prefix given two integer arrays.MediumCoding· Amazon
  9. 33Print the maximum positive sequence in a given array.MediumCoding· Amazon
  10. 34Implement inorder traversal for an N-ary tree.MediumCoding· Amazon
  11. 35Given an array, print the Next Greater Element (NGE) for each element. The NGE for an element x is the first greater element on the right side of x in the array, or -1 if none exists.MediumCoding· Amazon
  12. 36Given an nxn grid of 1s and 0s, return the number of islands in the input.MediumCoding· Adobe, Amazon