Skip to content

Commit 824c053

Browse files
committed
Added First_Missing_Positive_Number Program
1 parent b8b4391 commit 824c053

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

First_Missing_Positive_Number.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import java.util.Arrays;
22
import java.util.Scanner;
3+
/*Given an unsorted integer array, find the smallest missing positive integer.
4+
It should run in O(n) time and uses constant extra space.
5+
6+
Example 1:
7+
8+
Input: [1,2,0]
9+
Output: 3 */
310

411
public class First_Missing_Positive_Number {
512

0 commit comments

Comments
 (0)