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 have to say it is a ugly feature of ruby to use
%
for formatting. I would rather usesprintf
or other helper methods to achieve this.I think
total
is better, it stands for the sum of all previous results.This is so clever. I didn't know
String.prototype.replace
's real power!"Test Failed: Should parse numbers - Expected: 3, instead got: 3", WTF is this!?
I suggest you to add some trivial examples. That would help others solve this kata.
Thanks. I struggled with that for a while. After removing the
\n
at the last line, my solution got passed. Nice kata! I think it's 5kyu.Also, it should be documented that whether the last line should contain
\n
or not.The image is missing, pls fix that.
This comment is hidden because it contains spoiler information about the solution
My code run through a test with 9999999 items within 0.5s, which is surely high efficient enough.
I used BST and it is still timeout. I did massive tests, none of them failed. Maybe you should adjust the time limit.