Non-continuous subsequences: Difference between revisions
m
→{{header|Sidef}}: minor code simplifications
m (→{{header|REXX}}: added/changed whitespace and comments, elided the STYLE from the PRE html tags.) |
m (→{{header|Sidef}}: minor code simplifications) |
||
Line 1,940:
=={{header|Sidef}}==
{{trans|Perl}}
<lang ruby>func non_continuous(min, max, subseq=[], has_gap=false) {
static current = [];
Line 1,950 ⟶ 1,949:
i < max && non_continuous(i.inc, max, subseq, has_gap);
current.pop;
has_gap = current.len
}
|