Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Latest commit

 

History

History
executable file
·
18 lines (11 loc) · 337 Bytes

File metadata and controls

executable file
·
18 lines (11 loc) · 337 Bytes

题目

Given an unsorted integer array, find the first missing positive integer.

For example,

Given [1,2,0] return 3,
and [3,4,-1,1] return 2.

Your algorithm should run in O(n) time and uses constant space.

解题思路

总结