qsort time and space complexity
quicksort sucks in the worst case. Fix that. Probably use another algorithm like heapsort.
Alternatively, “use a loop for one side and only do recursion on the smallest side, thus reaching O(log n) space complexity.” But not sure if that actually is the best way and it doesn't solve performance issues.