Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 383 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 383 Bytes

<< [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