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,13 @@
fcn combSort(list){
len,gap,swaps:=list.len(),len,True;
while(gap>1 or swaps){
gap,swaps=(1).max(gap.toFloat()/1.2473), False;
foreach i in (len - gap){
if(list[i]>list[i + gap]){
list.swap(i,i + gap);
swaps=True;
}
}
}
list
}

View file

@ -0,0 +1,2 @@
combSort(List(28, 44, 46, 24, 19, 2, 17, 11, 25, 4)).println();
combSort("This is a test".toData()).text.println();