Ad
  • Custom User Avatar

    The meaning of "consecutive" is explained in the description: "By not consecutive we mean not exactly 1 larger than the previous element of the array." So basically numbers which differ by more than one are not consecutive. In the example [4,6,7,8,9,11] the 6 is not consecutive, because it does not come (as a natural number) after 4.

  • Custom User Avatar

    Did you test your solution with examples? Did you try this test case?

    test.assert_equals(first_non_consecutive([4,6,7,8,9,11]), 6)

    Your solution has a bug and fails when the answer is on position 1, for example [0, 2, 3]. You need to fix it.