Question DSA-SORT-0069
HardHow does introsort (used by C++ std::sort) avoid quick sort's worst case?
- A.
It always uses heap sort
- B.
It picks a random pivot only
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Sorting question
How does introsort (used by C++ std::sort) avoid quick sort's worst case?
It always uses heap sort
It picks a random pivot only
Sign up free to see the answer and a step-by-step explanation.
It switches to heap sort when the recursion gets too deep
It uses insertion sort for everything