Ad
  • Custom User Avatar

    return the count of pairs that have consecutive numbers

    These are the pairs for that input:

    (21, 20), (22, 40), (39, -56), (30, -55), (95, 94)

    Only two of those have consecutive numbers: (21, 20), (95, 94)