Jump to content

Longest increasing subsequence: Difference between revisions

m
C# Added output
m (Remove unnecessary hidden comments)
m (C# Added output)
Line 295:
}
return result;
}
 
public static void Main() {
Console.WriteLine(string.Join(",", LIS.Find(new [] { 3, 2, 6, 4, 5, 1 })));
Console.WriteLine(string.Join(",", LIS.Find(new [] { 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15 })));
}
}</lang>
{{out}}
<pre>
2, 4, 5
0, 2, 6, 9, 11, 15</pre>
 
=={{header|C++}}==
196

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.