Ad
  • Default User Avatar

    Yup, I understand now. Thanks for the explanation.

  • Default User Avatar

    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?

  • Default User Avatar

    I aware of 'sorted' function only after seeing other solutions :)

  • Default User Avatar

    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).

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

    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?

  • Default User Avatar

    Oops...sorry. You are right. I've now found that I've modified the 'arr1'.

  • Default User Avatar

    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 :)

  • Default User Avatar

    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'.

  • Default User Avatar

    Approved. Thanks for taking your time to translate this kata.

  • Default User Avatar

    Oops...I see now. The example test cases have been updated. My bad, should have checked preview before publishing. Thanks for pointing out.

  • Default User Avatar

    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.

  • Default User Avatar

    Oic, thanks. I'll look around as you advised.

  • Default User Avatar

    This is my first kata and it will be great if someone can show me how to add random test cases.

  • Loading more items...