Amazon Interview Question

The question was on Binary Search on answer