Created
January 10, 2020 08:42
-
-
Save ShinJJang/0714c8dcc8d7117783d65ae42c792372 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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