Given a positive integer , return true if is a perfect square, otherwise return false.
For example, returns true (because ), but returns false.
The catch: you cannot use built-in square root functions. How would you check this without calling sqrt?
LeetCode 367
Given a positive integer , return true if is a perfect square, otherwise return false.
For example, returns true (because ), but returns false.
The catch: you cannot use built-in square root functions. How would you check this without calling sqrt?