Longest increasing subsequence: Difference between revisions

Content added Content deleted
(→‎{{header|D}}: Add sub-header)
m (→‎{{header|Perl 6}}: adding "Perl 6" in the subsection titles)
Line 334: Line 334:


=={{header|Perl 6}}==
=={{header|Perl 6}}==
===Dynamic programming===
===<!--Perl 6-->Dynamic programming===
Straight-forward implementation of the algorithm described in the video.
Straight-forward implementation of the algorithm described in the video.
Line 357: Line 357:
0 2 6 9 11 15</pre>
0 2 6 9 11 15</pre>


===Patience sorting===
===<!--Perl 6-->Patience sorting===
<lang Perl 6>sub patience(@deck is copy) {
<lang Perl 6>sub patience(@deck is copy) {
my @S = [@deck.shift() => Mu].item;
my @S = [@deck.shift() => Mu].item;