Amazon interview question

Implement sqrt funct using bin search