Longest increasing subsequence: Difference between revisions

no edit summary
(Cut and paste misfire)
No edit summary
Line 613:
0 2 6 9 11 15
</pre>
 
=={{header|Mathematica}}==
Although undocumented, Mathematica has the function LongestAscendingSequence which exactly does what the Task asks for:
<lang Mathematica>LongestAscendingSequence/@{{3,2,6,4,5,1},{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|Objective-C}}==
1,111

edits