Anonymous user
Sorting algorithms/Insertion sort: Difference between revisions
→{{header|Perl}}: Rather not use a statement label if I can help it
(Add javascript example) |
(→{{header|Perl}}: Rather not use a statement label if I can help it) |
||
Line 839:
<lang perl>
sub insertion_sort {
my @a = @_;
for my $
if ($
my $k = splice @a, $i,
last;
}
}
}
@a;
}
my @a = (4, 65, 2, -31, 0, 99, 83, 782, 1);
|