Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
most elegant solution
I don't think this is either a clever or best practice to find out square number, because it is very
inefficient for large numbers.
In my computer, it toke 31 seconds to run your code and
isSquare 100000000
and find out it is a square number.But if you use bisector method (like my answer), it will take less than a second.