Anonymous user
Longest increasing subsequence: Difference between revisions
Corrected typo in the language name. Updated to compile with Nim 1.4. Other minor changes.
(Add Maple solution) |
(Corrected typo in the language name. Updated to compile with Nim 1.4. Other minor changes.) |
||
Line 1,450:
<pre>{{2,4,5},{0,2,6,9,11,15}}</pre>
=={{header|
{{trans|Python}}
<lang
var l:
for i in 0 ..
var x:
for j in 0 ..
if l[j][l[j].high] < d[i] and l[j].len > x.len:
x = l[j]
l.add x & @[d[i]]
for x in l:
if x.len > result.len:
Line 1,466 ⟶ 1,465:
for d in [@[3,2,6,4,5,1], @[0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15]]:
echo "
{{out}}
<pre>
=={{header|Objective-C}}==
|