function quickSortWrapper(collection) {
  const array = Array.from(collection); // <1>
  shuffle(array); // <2>
  return quickSort(array);
}
Quick sort
Runtime: O(n log n)
@param {Array|Set} collection elements to be sorted
@returns {Array} sorted array