Find first missing positive: Difference between revisions

m
Added Easylang
(Added Sidef)
m (Added Easylang)
 
(One intermediate revision by one other user not shown)
Line 573:
</pre>
 
 
=={{header|EasyLang}}==
<syntaxhighlight>
func missing a[] .
h = 1
repeat
v = 0
for v in a[]
if h = v
break 1
.
.
until v <> h
h += 1
.
return h
.
a[][] = [ [ 1 2 0 ] [ 3 4 -1 1 ] [ 7 8 9 11 12 ] ]
for i to len a[][]
write missing a[i][] & " "
.
</syntaxhighlight>
{{out}}
<pre>
3 2 1
</pre>
 
=={{header|F_Sharp|F#}}==
Line 1,295 ⟶ 1,321:
=={{header|Wren}}==
{{libheader|Wren-sort}}
<syntaxhighlight lang="ecmascriptwren">import "./sort" for Sort
 
var firstMissingPositive = Fn.new { |a|
2,041

edits