Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function quicksort2(l,r)
  2.   Local p,q,h
  3.   p=l
  4.   q=r
  5.   x=super_scores((l+r)/2)
  6.   Repeat
  7.     While super_scores(p) < x
  8.       p=p+1
  9.     Wend
  10.     While x < super_scores(q)
  11.       q=q-1
  12.     Wend
  13.     If p>q Then Exit
  14.     ;SWAP------------------
  15.     h=super_scores(q)
  16.     super_scores(q)=super_scores(p)
  17.     super_scores(p)=h
  18.     ;----------------------
  19.     p=p+1
  20.     q=q-1
  21.     If q<0 Then Exit
  22.   Forever
  23.   If l < q Then a=quicksort(l,q)
  24.   If p < r Then a=quicksort(p,r)
  25.   Return True
  26. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement