September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,9 @@
|
|||
fcn selectionSort(list){ // sort a list of ints
|
||||
copy,r:=list.copy(),List();
|
||||
while(copy){
|
||||
min,idx:=(0).min(copy), copy.find(min);
|
||||
r.append(min);
|
||||
copy.del(idx);
|
||||
}
|
||||
r
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
selectionSort(List(28, 44, 46, 24, 19, -5, 2, 17, 11, 25, 4)).println();
|
||||
Loading…
Add table
Add a link
Reference in a new issue