ตัวอย่างโค้ด ของ สทูจซอร์ต

function stoogesort(array L, i = 0, j = length(L)-1){    if L[i] > L[j] then        L[i] ↔ L[j]    if (j - i + 1) > 2 then        t = (j - i + 1) / 3        stoogesort(L, i  , j-t)        stoogesort(L, i+t, j  )        stoogesort(L, i  , j-t)    return L}

ใกล้เคียง