LeetCode HARD 41 First Missing Positive Summary
Generated by Codex with GPT-5
Quick facts
- Difficulty:
HARD - Problem: First Missing Positive
- Main tags:
Array,Hash Table
What the problem is really asking
Given an unsorted integer array, return the smallest positive integer that does not appear in the array.
The tricky part is not the definition of the answer. The tricky part is the constraint: the best solution must run in O(n) time and use only O(1) extra space.