Ad
  • Default User Avatar

    myjinxin2015: even though I think it's not correct approach and evaluation of tests should be independent of the modification to the original array (it still returns correct sum, doesn't it? and why it works with initial tests but not random?) you're right that it helps to pass the random tests. Once I changed code the way it works with copy of original array it works fine.

    Anyway, you are not sensei of this kata and thanks for advice

  • Default User Avatar

    Well, I think there is serious bug in random test evaluation. All test cases are marked as failed but sum returned by my function is always lower then Expected...

    numbers: 1060,18,70,14,97
    1stLowest: 14
    2ndLowest: 18
    Sum: 32
    ✘ Expected: 88, instead got: 32

    numbers: 1086,64,49,43,52
    1stLowest: 43
    2ndLowest: 49
    Sum: 92
    ✘ Expected: 101, instead got: 92

    numbers: 1038,69,7,27,97
    1stLowest: 7
    2ndLowest: 27
    Sum: 34
    ✘ Expected: 96, instead got: 34

    numbers: 1066,63,45,91,63
    1stLowest: 45
    2ndLowest: 63
    Sum: 108
    ✘ Expected: 126, instead got: 108

    numbers: 1036,51,84,97,57
    1stLowest: 51
    2ndLowest: 57
    Sum: 108
    ✘ Expected: 141, instead got: 108