Skip to content

Instantly share code, notes, and snippets.

@ShinJJang
Created January 10, 2020 08:42
Show Gist options
  • Save ShinJJang/0714c8dcc8d7117783d65ae42c792372 to your computer and use it in GitHub Desktop.
Save ShinJJang/0714c8dcc8d7117783d65ae42c792372 to your computer and use it in GitHub Desktop.
def solution(A):
min_value = 1000000
missing_list = [True] * 1000000
for num in A:
if num > 0:
missing_list[num-1] = False
for idx, is_missing in enumerate(missing_list):
if is_missing:
return idx + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment