Find first missing positive: Difference between revisions
m
→{{header|J}}
m (→{{header|J}}) |
m (→{{header|J}}) |
||
Line 436:
=={{header|J}}==
The first missing positive can be no larger than 1 plus the length of the list.
Note that the <nowiki>{{ }}</nowiki> delimiters on definitions was introduced in J version 9.2
<lang J>fmp=: {{ {.y-.~1+i.1+#y }}S:0</lang>
|