First Missing Positive at ServiceNow

Hard42.4% acceptance

This problem has 75.0% frequency at ServiceNow.

Problem Description

Given an unsorted integer array `nums`. Return the _smallest positive integer_ that is _not present_ in `nums`. You must implement an algorithm that runs in `O(n)` time and uses `O(1)` auxiliary space.

Read full problem and hints

Topics

Also asked at 34 companies


More ServiceNow Questions

View all ServiceNow questions