2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -1,2 +1,8 @@
{{Sorting Algorithm}}
In this task, the goal is to sort an integer array with the [[wp:Radix sort|radix sort algorithm]]. The primary purpose is to complete the characterization of sort algorithms task.
;Task:
Sort an integer array with the   [[wp:Radix sort|radix sort algorithm]].
The primary purpose is to complete the characterization of sort algorithms task.
<br><br>

View file

@ -5,7 +5,7 @@ sub radsort (@ints) {
for reverse ^$maxlen -> $r {
my @buckets = @list.classify( *.substr($r,1) ).sort: *.key;
if !$r and @buckets[0].key eq '-' { @buckets[0].value .= reverse }
@list = map *.value.values, @buckets;
@list = flat map *.value.values, @buckets;
}
@list».Int;
}