Created
June 8, 2018 13:45
-
-
Save acwoss/7f923c56f5768f77ad401f073b4c7650 to your computer and use it in GitHub Desktop.
TintedScrawnyClicks created by acwoss - https://repl.it/@acwoss/TintedScrawnyClicks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import count | |
def solution(A, N) -> int: | |
for i in count(1): | |
if i not in A: | |
return i | |
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