Find the smallest positive number missing from an unsorted array leetcode
Answers
Answered by
0
We can use sorting to solve it in lesser time complexity. We can sort the array in O(nLogn) time. Once the array is sorted, then all we need to do is a linear scan of the array. So this approach takes O(nLogn + n) time which is O(nLogn).
Similar questions
Computer Science,
6 months ago
Geography,
6 months ago
English,
6 months ago
Physics,
1 year ago
Biology,
1 year ago