Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
First Missing Positive
Hard
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Find the smallest missing positive integer in unsorted array.
Sample Input:
[3,4,-1,1]
Sample Output:
2
Hints
Hint 1
Place each number in its correct position
Hint 2
Number i should be at index i-1
Hint 3
Scan for first incorrect position
Code Editor
Reset
Run
Save
Loading...