Skip to content

Instantly share code, notes, and snippets.

@acwoss
Created June 8, 2018 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acwoss/ca8c59227400c71e47209a9d777548fb to your computer and use it in GitHub Desktop.
Save acwoss/ca8c59227400c71e47209a9d777548fb to your computer and use it in GitHub Desktop.
WellinformedWordyObservatory created by acwoss - https://repl.it/@acwoss/WellinformedWordyObservatory
def solution(A, N) -> int:
i = 1
while True:
if i not in A:
return i
i += 1
assert solution([1, 3, 6, 4, 1, 2], 6) == 5
assert solution([1, 2, 3], 3) == 4
assert solution([-1, -3], 2) == 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment