What is the cut-off for switching from quick sort to insertion sort in the implementation of introsort?

Giang Phạm

New member
What is the cut-off for switching from quick sort to insertion sort in the implementation of introsort?
A. 4
B. 8
C. 16
D. 32
 
Answer: c
Explanation: When small arrays needs to be sorted then insertion sort proves to be the best choice. So when the size of the partition is less than 16 introsort switches to insertion sort. This particular value has been deduced experimentally.
 

Tìm kiếm

Back
Top