Given a non-negative integer n, return the largest integer k such that k * k <= n.
Do it with integer arithmetic only: floating-point square roots lose precision for the large values in
the tests, and math.isqrt defeats the purpose of the exercise.
Examples
Input: n = 16
Output: 4
Input: n = 17
Output: 4
Input: n = 0
Output: 0
Constraints
0 <= n <= 10**18- Required time:
O(log n); counting upwards from 0 is far too slow.
Goals
- Search a numeric range instead of a list
- Keep the last value that satisfies a monotone condition