Skip to content

won-cp/debugging-one

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

First Missing Positive Integer

You are given an array of integers. Return the smallest positive integer that is not present in the array. The array may contain duplicate entries.

For example, the input [3, 4, -1, 1] should return 2 because it is the smallest positive integer that doesn't exist in the array.

Someone tried to write a solution but didn't know python very well and wasn't sure if they got the correct solution.

Please debug to get the correct output.

print first_missing_positive([3, 4, -1, 1])
# 2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages