Given a non-negative integer x, return the integer square root of x, meaning the largest integer r such that r*r <= x. This is a classic boundary and overflow-safe arithmetic problem.
x = non-negative integer
floor square root of x
Example 1:
Input:
x = 4
Output:
2
Explanation:
The square root of 4 is exactly 2.
Example 2:
Input:
x = 8
Output:
2
Explanation:
The floor square root of 8 is 2 because 3*3 > 8.