
Desicription
Implement int sqrt(int x).
Compute and return the square root of x.
x is guaranteed to be a non-negative integer.
Example 1:
1 |
Input: 4 |
Example 2:
1 |
Input: 8 |
Solution
1 |
class { |

Implement int sqrt(int x).
Compute and return the square root of x.
x is guaranteed to be a non-negative integer.
Example 1:
1 |
Input: 4 |
Example 2:
1 |
Input: 8 |
1 |
class { |
近期评论