Find first missing positive: Difference between revisions

Content added Content deleted
Line 953: Line 953:
Then hunt for the first item which does not have the same value as its index.
Then hunt for the first item which does not have the same value as its index.


<syntaxhighlight lang="Quackery"> [ dup size [] rot
<syntaxhighlight lang="Quackery"> [ dup size 1+ [] rot
witheach
witheach
[ dup 0 > iff
[ dup 0 > iff