Samsung Electronics Interview Question

I was asked a binary search problem.