Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function quicksort2(l,r)
- Local p,q,h
- p=l
- q=r
- x=super_scores((l+r)/2)
- Repeat
- While super_scores(p) < x
- p=p+1
- Wend
- While x < super_scores(q)
- q=q-1
- Wend
- If p>q Then Exit
- ;SWAP------------------
- h=super_scores(q)
- super_scores(q)=super_scores(p)
- super_scores(p)=h
- ;----------------------
- p=p+1
- q=q-1
- If q<0 Then Exit
- Forever
- If l < q Then a=quicksort(l,q)
- If p < r Then a=quicksort(p,r)
- Return True
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement