The TransCompilator

Solved LeetCode program · 41 of 1,000

#0041 · First Missing Positive

Hard Array chunk-01.md

Original English source

Start with the list of numbers 3, 4, -1, and 1.
For every candidate from 1 to one more than the number of items in the list.
If the list does not contain candidate, report candidate, then stop.

Open in Playground Browse all 1,000 problems

Expected stdout

2