LeetCode 0069 - Sqrt(x)
Contents
Sqrt(x)
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 Solution { |
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 Solution { |