+1 vote
in Data Structures & Algorithms II by (110k points)
Which among the following is the best cut-off range to perform insertion sort within a quick sort?

(a) N=0-5

(b) N=5-20

(c) N=20-30

(d) N>30

The question was asked in my homework.

Origin of the question is Quicksort topic in division Sorting of Data Structures & Algorithms II

1 Answer

+1 vote
by (614k points)
selected by
Best answer
The correct choice is (b) N=5-20

To explain: A good cut-off range is anywhere between N=5 and N=20 to avoid nasty degenerate cases.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.