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.
This is perhaps the first such integer: 1125899940397056. For this input, the answer should be 1125899906842624, but it gives 1125899973951489.
And the total number of such safe integers is tens of millions.
The LHS does not use the
reverse
method.conversion to String is needed to use the method reverse
good point
Yes, technically it should but the question does not mention that the code needs to handle strings in case insensitive manner.
why is this a palindrome if "anna"-"Anna" is not recognize as palindrome?
Oh i see, that stuff about how we cant compare objects directly. Thanks.
Array is an object, so strict equality won't evaluate as true.
"Square it and you'll get the nearest square number."
Square it and you'll get the square of the nearest natural number - not necessarily the nearest square number.
They are different things and not actually the same.
THIS IS NOT NECESSARILY CORRECT
For an input 12.4, the answer should be 9, but this gives 16.
I know the question asks for integers, but there must be some integers for which this holds also.