solution

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 0 Imported by: 0

README

41. First Missing Positive

[困难] 数组


给你一个未排序的整数数组,请你找出其中没有出现的最小的正整数。

 

示例 1:

输入: [1,2,0]
输出: 3


示例 2:

输入: [3,4,-1,1]
输出: 2


示例 3:

输入: [7,8,9,11,12]
输出: 1


 

提示:

你的算法的时间复杂度应为O(n),并且只能使用常数级别的额外空间。

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL