Skip to content

umairshahid436/Smallest-Positive-Integer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Smallest-positive-integer

Given an array A of N integers
For Example:
Input: {2, 3, 7, 6, 8, -1, -10, 15}
Output: 1
Input: { 2, 3, -7, 6, 8, 1, -10, 15 }
Output: 4
Input: {1, 1, 0, -1, -2}
Output: 2

It will return the smallest positive integer (greater than 0) that does not occur in A.

Complexity of written code is O(nlogn)

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages