
advanced
9 min read
First Missing Positive
The array is not just input. Under the right invariant, it becomes its own presence map.
View solutionExploit a value-to-index mapping to place elements naturally and expose missing, duplicate, or displaced values in place.
Problems
Practice problems that share this primary solution pattern and compare the clues that reveal it.

The array is not just input. Under the right invariant, it becomes its own presence map.
View solution