Guest User

Untitled

a guest
Nov 17th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. def qsort(ary)
  2. ary.size < 2 ? ary.dup : qsort(ary.drop(1).select {|x| x < ary.first }) + [ary.first] + qsort(ary.drop(1).select {|x| x >= ary.first })
  3. end
Add Comment
Please, Sign In to add comment