quick sort and merge sort together in helper class