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.
Forked & Approved by someone
SOMEONE FORGOT TO TURN OFF CAPS LOCK
rejected because no random tests.
APPROVED SOME TIME AGO
I didn't tune the tests here, actually. For this time, it's all on the author's back... ;)
I would say you should go the way of making language versions proportional in terms of time. If java performance tests take X% of allowed time, put as many test cases in Ruby so they will also take X% of available time.
Usually it's enough for performance tests to run ~6s or so, so user has some margin and they can focus on general approach rather than microoptimisations. I have no idea how intensive java tests are, but knowing B4B I'd guess X is nothing like 50%, tho :) If it would mean that Ruby has 100x fewer tests than Java, then it's OK. Anyway, no one would expect more from Ruby, right? ;)
that's not enough yes. Considering the number of tests in Java, less than 5000-6000 (edit, maybe a bit less...?) in Ruby would end up in a joke. Especially considering the reference solution solves those 40000 tests in "no time".
The only way to proceed, here, would be to translate an efficient solution (knowing there are no antipatterns for performances that are specific to ruby), then tune the tests. But clearly, this could be a pain...
Done. Thank you!