Quicksort Multiple choice Questions and Answers (MCQs)

 

 Help authour, Buy PDF Ebook   >>>Click Here<<<

Quicksort Multiple choice Questions and Answers (MCQs)

Click on any option to know the CORRECT ANSWERS

Question 11
Which is the worst method of choosing a pivot element?
A
first element as pivot
B
last element as pivot
C
median-of-three partitioning
D
random element as pivot
Library science Questions answers

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.

Question 12
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
Library science Questions answers

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.

 

 Download all FREE PDF Ebook >>>CLICK HERE<<<