Amazon interview question

Coding: Easy Binary search (LeetCode 278)