Ad
  • Custom User Avatar

    If you're still stuck, post your code (put a line of three backticks ``` before and after) and mark it as "having spoiler content".
    As much as I appreciate reading an algorithm in English, it might be easier to see your problems in JavaScript.

  • Default User Avatar

    Id assume we are looking at the last index value, so 7's index of 4 is before the second 5's index of 5

  • Default User Avatar

    How does [5,5] ends earlier than [3,7] ?

  • Custom User Avatar

    Tiebreaking considers the entire pair, so you need to look at the end instead. [5,5] ends earlier than [3,7].