Is Perfect Square
EasyMath
Description
Given a non-negative integer n, return true if it is the square of a whole number, and false otherwise.
Examples
Input:
n = 16Output:
trueExplanation:
16 is the square of a whole number.
Input:
n = 14Output:
falseExplanation:
14 is not the square of a whole number.
Input:
n = 0Output:
trueExplanation:
0 is the square of a whole number.
Constraints
- •
0 ≤ n ≤ 10⁹