Quicksort Multiple choice Questions and Answers (MCQs)
Click on any option to know the CORRECT ANSWERS
Which is the worst method of choosing a pivot element?
first element as pivot
last element as pivot
random element as pivot
Question 11 Explanation:
Choosing the first element as pivot is the worst method because if the input is pre-sorted or in reverse order, then the pivot provides a poor partition.
Which among the following is the best cut-off range to perform insertion sort within a quick sort?
Question 12 Explanation:
A good cut-off range is anywhere between N=5 and N=20 to avoid nasty degenerate cases.
There are 12 questions to complete.