Amazon Interview Question

Q: Variation of binary search