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 4Medium 9Hard 4
Filters · onDifficulty, topic, company

30 questions

  1. 25Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?MediumCoding· Adobe, Apple
  2. 26Given an array of points on a plane (x,y), write a function to return the distance between the closest pair of points.HardCoding· Visa
  3. 27Find the number of rotations in a circularly sorted array.MediumCoding· AMD, Microsoft
  4. 28Given an array, find the two sum.EasyCoding· Adobe, Amazon
  5. 29Given an nxn grid of 1s and 0s, return the number of islands in the input.MediumCoding· Adobe, Amazon
  6. 30Reverse a SentenceEasyCoding· Adobe, Apple