2 ms·
Introsort switches to heapsort if the recursion depth becomes too big to limit runtime to O(n log n), which indirectly also limits space to O(log n).
by nightcracker 11y ago
Introsort switches to heapsort if the recursion depth becomes too big to limit runtime to O(n log n), which indirectly also limits space to O(log n).