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.
Yup, I understand now. Thanks for the explanation.
Hi,
For the first example test case
knapsackLight(10,5,6,4,8)
the result shouldn't be 12? (2 items of weight 4 which has max value of 12.)Also for the last example test case
knapsackLight(3,5,3,8,10)
the result shouldn't be 6? (2 items of weight 5 which has max value of 6.)Or am I missing something in understanding the kata?
I aware of 'sorted' function only after seeing other solutions :)
Thanks for pointing this out. I am still exploring python and I realized using [] in this case is redundant after seeing other solutions (including yours).
Hi,
Do I suppose to pass 5000+ test cases for this kata?
Or is there some bug in generating test cases?
My current implemtation get pass 4930 test cases and get time out.
Hi,
For 'Ruby' test cases, the description mentions to return ':blaze_rod' but the test cases are testing for ':blazeRod'.
You may update your test cases so that they are in accordance with the description.
I've got some errors in 'Ruby' random tests. Below is one example.
Testing for [6, 3, "is", "beware", "mighty", [], "testing", "watch", 5]
✘ It should work for random inputs too - Expected: [6, "is", "mighty", "testing", 5, "beware", "watch", [], 3], instead got: [6, "is", "mighty", "testing", 5, 3, [], "watch", "beware"]
I've passed all basic tests and I believe my result above is in accordance with the samples provided.
Did I missed something in understanding the kata's requirement?
Oops...sorry. You are right. I've now found that I've modified the 'arr1'.
It seems to be working now. I've passed all the random tests.
Btw, from the start I didn't modify the original array. It's the same code that's failed before is now passed.
Thanks for the enjoyable kata :)
Seems to have some problem in random test for 'join' method.
Testing for: arr1=[26, 19, 29, 15, 2, 21, 11], arr2=[[2], [1], [4]] results:
✘ Expected: [[], nil, nil], instead got: [[26, 19], [29], [15, 2, 21, 11]]
All random tests for 'join' fails with similar 'Expected'.
Btw, the language is 'Ruby'.
Approved. Thanks for taking your time to translate this kata.
Oops...I see now. The example test cases have been updated. My bad, should have checked preview before publishing. Thanks for pointing out.
Hi, I am not sure which tests you are referring to. I've checked random tests for a few time and find that all are validating for 'symbol'.
I also run your code and another's code and find that both are returning 'symbol' as key as expected.
Oic, thanks. I'll look around as you advised.
This is my first kata and it will be great if someone can show me how to add random test cases.
Loading more items...