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 am somewhat new to codewars, so maybe this feature is available and I'm just not aware of it. I like the ability to observe other peoples implementation; it's good for education in various clever approaches to problem solving, and idiocyncracies of a language. I noticed that the small and full test suite show run time. hmm... what about comparing various implementations using Benchmark to rank efficiency of a solution? So I did that using mine and 5 other solutions, then started refining mine with lessons learned from the benchmarking. Some things that work for a single method testing (altering default input array) become problems when testing multiple methods. Some techniques (smartmatching), while valid for the language, are just slower when compared to "less clever" techniques (simple for loop). Is there a good place in codewars to post my code and findings? Do other languages have something like the Perl Benchmark module for time testing, stress testing?
fwiw, in Perl, the use of printf("%.0f",$float) does a "round half to even" which does not work like the conventional "round to infinity" that we learned in grade school math.
the kata could be improved to catch this case, possibly. Not sure if this matters in other languages.
Stack Overflow for the win.