Trainman interview question

Binary search Square root without using inbuilt function