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

## Quicksort Multiple choice Questions and Answers (MCQs)

## Click on any option to know the CORRECT ANSWERS

Question 6 |

Which is the safest method to choose a pivot element?

choosing a random element as pivot | |

choosing the first element as pivot | |

choosing the last element as pivot | |

median-of-three partitioning method |

**GK Questions answers**

Question 6 Explanation:

This is the safest method to choose the pivot element since it is very unlikely that a random pivot would consistently provide a poor partition.

Question 7 |

What is the average running time of a quick sort algorithm?

O(N ^{2}) | |

O(N) | |

O(N log N) | |

O(log N) |

**History Questions answers**

Question 7 Explanation:

The best case and average case analysis of a quick sort algorithm are mathematically found to be O(N log N).

Question 8 |

Which of the following sorting algorithms is used along with quick sort to sort the sub arrays?

Merge sort | |

Shell sort | |

Insertion sort | |

Bubble sort |

**Reasoning Questions answers**

Question 8 Explanation:

Insertion sort is used along with quick sort to sort the sub arrays.

It is used only at the end.

Question 9 |

Quick sort uses join operation rather than merge operation.

true | |

false |

**Commerce Questions answers**

Question 9 Explanation:

Quick sort uses join operation since join is a faster operation than merge.

Question 10 |

How many sub arrays does the quick sort algorithm divide the entire array into?

one | |

two | |

three | |

four |

**Aptitude test Questions answers**

Question 10 Explanation:

The entire array is divided into two partitions, 1st sub array containing elements less than the pivot element and 2nd sub array containing elements greater than the pivot element.

There are 10 questions to complete.