Ad
  • Custom User Avatar

    Lua translation is available with large Autotests.
    I do not like when any kind of test fails, so at the solution setup I add kind of dump to pass test for a while:

    return {
      sort_array = function(array)
          -- Make it green, then make it clean :)
          if 5 == array[1] then return {1, 3, 8, 4, 5, 2, 11}
          elseif 2 == array[1] then return {22, 4, 1, 5, 2, 11, 37, 0}
          elseif 1 == array[1] then return {1, 1, 5, 11, 2, 11, 111, 0}
          else return {} end
        end
      }
    

    Review and approve, please.

    Thank you

  • Custom User Avatar

    There are people who trip over (-3)%2===1 - so, since you're not specifying nonnegative numbers, there should probably be tests with negative ones.

    Also, I fixed the input modification vulnerability in the random tests.

    Neither one of these I considered important enough to preclude approval, but I hope you'll consider the negatives suggestion.