Ad
  • Custom User Avatar
  • Custom User Avatar

    Please post your solution and mark it as having spolier content.

  • Custom User Avatar

    Do not modify the original array ;-)
    Make a new copy then start your work.

  • Custom User Avatar

    I'm also getting failures in random tests and, after some messing around, I got this:

    ✘ Expected: 56, instead got: '19 [1034,87,2,39,17]'
    ✘ Expected: 69, instead got: '36 [1006,31,5,38,61]'
    ✘ Expected: 134, instead got: '107 [1019,73,66,41,68]'
    ✘ Expected: 70, instead got: '19 [1089,89,13,6,57]'
    ✘ Expected: 26, instead got: '8 [1087,83,5,21,3]'
    ✘ Expected: 73, instead got: '52 [1048,87,27,46,25]'

    Where you can see that my solution was correct, but the expected values weren't.

  • Custom User Avatar

    Random tests doesn't work
    Log
    [ 1034, 24, 64, 2, 80 ]
    lowest-1 = 2
    lowest-2 = 24
    ✘ Expected: 88, instead got: 26
    Log
    [ 1070, 67, 47, 1, 81 ]
    lowest-1 = 1
    lowest-2 = 47
    ✘ Expected: 114, instead got: 48
    Log
    [ 1045, 32, 5, 72, 1 ]
    lowest-1 = 1
    lowest-2 = 5
    ✘ Expected: 37, instead got: 6
    Log
    [ 1049, 47, 2, 61, 11 ]
    lowest-1 = 2
    lowest-2 = 11