
描述
Implement int sqrt(int x).
Compute and return the square root of x.
分析
二分查找。注意结果要向下取整时返回high。
代码
Python
1 |
class (object): |

Implement int sqrt(int x).
Compute and return the square root of x.
二分查找。注意结果要向下取整时返回high。
1 |
class (object): |
近期评论