Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
StoogeSort(L, i:=1, j:=""){
|
||||
if !j
|
||||
j := L.MaxIndex()
|
||||
if (L[j] < L[i]){
|
||||
temp := L[i]
|
||||
L[i] := L[j]
|
||||
L[j] := temp
|
||||
}
|
||||
if (j - i > 1){
|
||||
t := floor((j - i + 1)/3)
|
||||
StoogeSort(L, i, j-t)
|
||||
StoogeSort(L, i+t, j)
|
||||
StoogeSort(L, i, j-t)
|
||||
}
|
||||
return L
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
MsgBox % map(StoogeSort([123,51,6,73,3,-12,0]))
|
||||
return
|
||||
|
||||
map(obj){
|
||||
for k, v in obj
|
||||
res .= v ","
|
||||
return trim(res, ",")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue