0069. Sqrt(solutions/x)
https://leetcode.com/problems/sqrtx
Description
Given a non-negative integer x
, compute and return the square root of x
.
Since the return type is an integer, the decimal digits are truncated, and only the integer part of the result is returned.
**Note:**You are not allowed to use any built-in exponent function or operator, such as pow(x, 0.5)
or x ** 0.5
.
Example 1:
Example 2:
Constraints:
0 <= x <= 231 - 1
ac
Last updated