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.
I think it can be closed now.
I got as far as reading about numerical calculus and Lambert W functions before I realized a constant-time solution probably wasn't going to happen.
It's too late to change the kata design, it's been solved many times. (Also it teaches new c0ncept about arguments of functions, so why not?!)
I think it's more intersting with back ground :P
Fixed.
I will be happy to help you, but don't want to kill all the fun with this kata, not yet.
I did not test your solution, but it can be that it's not sorting what should be sorted.
And, in random tests, do you get errors, or timeouts?
Thanks for pointing out the little error with the tests.
But your solution was actually wrong.
I've edited the tests to now display the correct error message
It was originally made in JS as an exercise to teach you about varargs.
it's because test values for square was (4,4), so 4*4==2*(4+4)==16, so area==perimeter, so test passed :))
Fixed
Yes, you are right! I've recognized after I published it, and there is no way I can correct it. I simply calculated the perimeter and it had passed the tests.