Find first missing positive: Difference between revisions

add RPL
(Add C++ entry)
(add RPL)
Line 1,189:
the smallest missing positive integer for []: 1</pre>
 
 
=={{header|RPL}}==
≪ 1 '''WHILE''' DUP2 POS '''REPEAT''' 1 + '''END''' SWAP DROP ≫ '<span style="color:blue">FINDF</span>' STO
 
{ { 1 2 0 } { 3 4 -1 1 } { 7 8 9 11 12 } } 1 ≪ <span style="color:blue">FINDF</span> ≫ DOLIST
{{out}}
<pre>
1: { 3 2 1 }
</pre>
 
=={{header|Ruby}}==
1,150

edits