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.
Either way, really fun kata! Thx.
This comment is hidden because it contains spoiler information about the solution
Thanks for pointing that out! Messaging now updated.
Got it. Insight much appreciated.
Ok, rather than rewrite the kata, I just updated the instructions to reflect that, in this case, only integers are acceptable. Also included a method to convert negatives to positive and drop any decimals. Added additional Test.assertEquals() for negatives and zeros, and will use those Test methods going forward. Thanks.
Thanks for your suggestions. It's my first authored kata. Question: If I update the function so it only accepts positive integers, would it break the attempts submitted by other members, or rather, make them invalid?
Thanks a lot! I used it in a project a while back, and remember there being a multitude of ways to achieve the same result. Never tested for performance or edge cases, so thought this would be the perfect place to submit it.
A worthwhile exercise here, with many different solutions. Learned some better alternatives to the one I presented. Would also be interested in performance comparisons.