Longest increasing subsequence: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (Remove unnecessary hidden comments) |
m (C# Added output) |
||
Line 295: | Line 295: | ||
} |
} |
||
return result; |
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> |
}</lang> |
||
{{out}} |
|||
<pre> |
|||
2, 4, 5 |
|||
0, 2, 6, 9, 11, 15</pre> |
|||
=={{header|C++}}== |
=={{header|C++}}== |