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
Given an unsorted integer array, find the smallest missing positive integer.
Sample Input:
[3,4,-1,1]
Sample Output:
2
Hints
Hint 1
Try to place each number in its correct position
Hint 2
Number i should be at index i-1
Hint 3
Scan for first position where number is incorrect
Code Editor
Reset
Run
Save
Loading...