Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

<< [04] Find the first missing positive integer >>

Given an array of integers, find the first missing positive integer in linear time and constant space. You can modify the input array in-place.

Example:

>>> coding_problem_04([3, 4, -1, 1])
2

>>> coding_problem_04([1, 2, 0])
3

>>> coding_problem_04([4, 1, 2, 2, 2, 1, 0])
3