Ad
  • Custom User Avatar

    That is also what irritated me. It would make more sense if you could move if the direction is already correct.
    The code would have been so much clear without that case...

  • Custom User Avatar

    I do not think this code will work if all the test strings were reversed. I had a similar one but I added x string first instead of y and it did not work.

  • Custom User Avatar

    I just looked over it quickly, but it looks like you are also checking if it is near interesting when it is already past an interesting number.
    It should only check if an interesting number is within the next 2 mileage. It is not interesting anymore when it is past it.