Currency interview question

Binary search