Skip to content

Instantly share code, notes, and snippets.

@43061b4a
Created September 1, 2015 19:48
Show Gist options
  • Save 43061b4a/de5416f763b1c4b47e95 to your computer and use it in GitHub Desktop.
Save 43061b4a/de5416f763b1c4b47e95 to your computer and use it in GitHub Desktop.
def solution(A):
d = {}
result = 0
for i in range(len(A)):
if A[i] not in d and A[i] >= 1:
d[A[i]] = 0
j = 1
while j <= 100010:
if not j in d:
result = j
break
j += 1
return result
#https://codility.com/demo/results/demoMC99B7-2H5/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment