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.
This is a strange one, because the acceptance tests do not test for this.
If you also want to capitalize the last word add this code to the end:
.sub(/(\w+)$/,&:capitalize)
This comment is hidden because it contains spoiler information about the solution
Test cases changed. But, I haven't add the testcase like
a, b = [1,4,1], [1,3,2]
, just increased the testcase which expectedfalse
and two arrays have the same elements but different order(of course, their sums are equal ;-))Added to all languages ;-)
Also apparently every language has a different idea of how to handle
0
. So I've made every language consistent (now they all expect0
) ;-)I rewrote my solution
It would be much faster if you raised an issue about the Ruby tests being pretty inexistent. Now I've added random tests.
Huh, I never noticed that when writing the solution!
Looks like the Kata needs more tests.