Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 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