Sorting algorithms/Patience sort: Difference between revisions
Content deleted Content added
SqrtNegInf (talk | contribs) m →{{header|Perl}}: Fix link: Perl 6 --> Raku |
m →{{header|Phix}}: pp_StrFmt tweaks |
||
Line 785:
end for
-- merge sort the piles
sequence res =
while length(piles) do
integer idx = smallest(piles,return_index:=true)
Line 804:
for i=1 to length(tests) do
pp(patience_sort(tests[i]),{
end for</lang>
{{out}}
Line 810:
{-31,0,1,2,4,65,83,99,782}
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
{
</pre>
|