September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,11 @@
|
|||
fcn strandSort(A){ //--> new list, A is cleared, should add A=A.copy()
|
||||
sublist:=List.createLong(A.len()); results:=List.createLong(A.len());
|
||||
while(A){
|
||||
sublist.clear(A.pop(0));
|
||||
foreach i in (A.len() - 1){
|
||||
if(A[i]>sublist[-1]) sublist.append(A.pop(i));
|
||||
}
|
||||
results.merge(sublist);
|
||||
}
|
||||
results
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
strandSort(L(3,1,5,4,2)).println();
|
||||
strandSort("azbfe".split("")).println();
|
||||
Loading…
Add table
Add a link
Reference in a new issue