using quick sort to sort the anomaly scores