Monday, September 22, 2014

Sqrt(x)

Problem

Implement int sqrt(int x).
Compute and return the square root of x.

Idea

二分查找,注意溢出,注意结束的时候返回值

Solution


No comments:

Post a Comment