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.
And although it would be more advanced instead of returning
null
if you can't get a perfect match you should probably buy upto the most you can sobuy(3,[1,1]) = [0,1]
buy(5,[1,1,1,1,6]) = [0,1,2,3]
buy(1,[2,3]) = null
Shouldn't
buy(5,[5,2,3,4,5])
return[0]
and not[1,2]
?My solution passes but I think it shouldn't because in my tests my solution fails on the following.
Test.assert_equals(sort_string('bansanas', 'bn'), 'bnnasaas')
It might be helpful to mention the basic format of url paramaters (i.e. www.example.com/?key1=value1&key2=value2
Oh cool. Thanks for that info.
This comment is hidden because it contains spoiler information about the solution
Doesn't this give one too many in the list?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I think the point was to fix the switch statement, but this is a cleaner variant.