Bloomberg interview question

implement square root