Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

First Missing Positive

R

@nitinsurya finding a number in a set is O(n) operation in worst case, only in average case it is O(1) depending on the input size and hash table size which implements this set.

No one has replied

S

Arrays.sort() is at best O(nlog(n)) which does not meet the description's requirement of O(n) (even though the solution gets accepted).

Otherwise, this is good stuff :)

L

removal in lists is O(n), meaning this solution is in O(n^2)

Disabled Categories are greyed out

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.