all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
# Sorts an array in place
|
||||
sub bubble_sort {
|
||||
for my $i (0 .. $#_){
|
||||
for my $j ($i + 1 .. $#_){
|
||||
$_[$j] < $_[$i] and @_[$i, $j] = @_[$j, $i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
my @a = (39, 25, 30, 28, 36, 72, 98, 25, 43, 38);
|
||||
bubble_sort(@a);
|
||||
Loading…
Add table
Add a link
Reference in a new issue