Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,7 @@
fcn pancakeSort(a){
foreach i in ([a.len()-1..1,-1]){
j := a.index((0).max(a[0,i+1])); // min for decending sort
if(i != j){ a.swap(0,j); a.swap(0,i); }
}
a
}

View file

@ -0,0 +1 @@
j := (i+1).reduce('wrap(x,y){ if(a[x]>a[y]) x else y });

View file

@ -0,0 +1 @@
pancakeSort(List(7,6,9,2,4,8,1,3,5)).println();