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.
So that S and Z return an integer, wich seemed cleaner to me.
The sorting part of my first solution is a ugly hack but it still passes most of the time :
https://www.codewars.com/kata/reviews/617af30f6e47f30001186417/groups/62ed7e18fd3e760001ede112
This also could be a more advanced sequel to this kata.
Missing random tests.
Please read and apply https://docs.codewars.com/authoring/guidelines/kata/.
Beautiful solution.
Indeed, good catch !
This comment is hidden because it contains spoiler information about the solution
Fun kata !
May I suggest that you raise this as an issue, not a suggestion.
EDIT : It would also be useful to mention the language ... the error seems to be only in python.
Fun kata, harder than first expected (as often with g964 katas ...)
But a minor issue for python :
My solution is wrong for short strings and still passes most of the times.
I suggest adding the following test :
Fun kata
Indeed, apart from recursion, I'm summing over and over, I should sum once and subtract both ends... or start from the middle as you did.
I don't understand why we should return false for an empty array...
Am I the only one to think that true would make more sense here ?
Python :
Static test added.
Random generation slightly modified to avoid exceptions ( zero division and invalid input like "052" ) when generating a floating point number below 0.5.
Looks fine to me now.
Feel free to reraise if issue is not resolved.
Edit :
Static test also added for javascript.
This comment is hidden because it contains spoiler information about the solution
Loading more items...