List<int> sort(List<T> elements, int count) { computeKeys(elements, count); final map = List<int>.generate(count, (i) => i, growable: false); quickSort(map, 0, count - 1); return map; }