Valid Perfect Square

Easy · Binary Search · about 10 minutes

Asked at Google, Amazon, Bloomberg, LinkedIn.

Decide whether the positive integer num equals some integer times itself. Don't call a built-in square-root function.

Related guides