LeetCode
Perfect Squares
Click
here
for an explanation.