flash sort implemented in Ruby as fsort-method of array