First Missing Positive

hard
Unit 25 · BFS II0/0 to milestone

Return the smallest positive integer not present in an unsorted list, in O(n) time and O(1) extra space (you may modify the list).

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
First Missing Positive · TechGradify