quick sort implemented in ruby