Amazon | Interview Question | Binary Search variation
Anonymous User
3504

I received this problem at Amazon for an SDE internship position. We spent about half an hour on this problem.

You are given a sorted array and two different numbers, n and m. There may be duplicates in the array.
You have to answer the number of elements that are greater than n and less than m.

  • I thought this problem was easy.
  • This is a typical binary-search problem.
Comments (6)
No comments yet.