Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
sub quick_sort {
|
||||
return @_ if @_ < 2;
|
||||
my $p = splice @_, int rand @_, 1;
|
||||
quick_sort(grep $_ < $p, @_), $p, quick_sort(grep $_ >= $p, @_);
|
||||
}
|
||||
|
||||
my @a = (4, 65, 2, -31, 0, 99, 83, 782, 1);
|
||||
@a = quick_sort @a;
|
||||
print "@a\n";
|
||||
Loading…
Add table
Add a link
Reference in a new issue