Compute square root with precision | Bytedance Interview Question