Made quicksort.rb memory efficient