Ad
  • Custom User Avatar

    You mutated the input array

  • Custom User Avatar

    try to use print at some points in the routine to see if the program is doing what you are expecting it do

  • Custom User Avatar

    Even though 3 comes after the frist 5, 7 comes before the 2nd 5. Hence, 3,7 as a pair comes earlier.

  • Custom User Avatar

    Two of the excruciatingly long tests seem to be broken. Debug code:

    puts "Initial ints length is: #{ints.length}"
    if ints.length < 10
    puts ints
    end

    shows that the "Two Million Numbers With Pair At End: Should terminate with a valid pair output" and "Two Million Numbers With Pair At Start: Should terminate with a valid pair output" tests are only passing in 2 and 1 element arrays respectively, but are expecting a match (that isn't present in the arrays).