**DOWNLOAD FREE PDF** **<<CLICK HERE>>**

## Quicksort using Random Sampling Multiple choice Questions and Answers (MCQs)

Congratulations - you have completed *Quicksort using Random Sampling Multiple choice Questions and Answers (MCQs)*.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%

Your answers are highlighted below.

Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

Quick sort uses which of the following algorithm to implement sorting?

backtracking | |

greedy algorithm | |

divide and conquer | |

dynamic programming |

Question 1 Explanation:

Quick sort uses the technique of divide and conquer in order to sort a given array. It divides the array into two parts about the pivot and then apply a quick sort to both the parts.

Question 2 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

What is a randomized quick sort?

quick sort with random partitions | |

quick sort with random choice of pivot | |

quick sort with random output | |

quick sort with random input |

Question 2 Explanation:

Randomized quick sort chooses a random element as a pivot. It is done so as to avoid the worst case of quick sort in which the input array is already sorted.

Question 3 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

What is the purpose of using randomized quick sort over standard quick sort?

so as to avoid worst case time complexity | |

so as to avoid worst case space complexity | |

to improve accuracy of output | |

to improve average case time complexity |

Question 3 Explanation:

Randomized quick sort helps in avoiding the worst case time complexity of O(n2) which occurs in case when the input array is already sorted. However the average case and best case time complexities remain unaltered.

Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

What is the auxiliary space complexity of randomized quick sort?

O(1) | |

O(n) | |

O(log n) | |

O(n log n) |

Question 4 Explanation:

Auxiliary space complexity of randomized quick sort is O(log n) which is used for storing call stack formed due to recursion. Note that the algorithms with space complexity as O(log n) also qualifies as in place algorithms as the value of log n is close to 1.

Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

What is the average time complexity of randomized quick sort?

O(n log n) | |

O(n ^{2}) | |

O(n ^{2} log n) | |

O(n log n ^{2}) |

Question 5 Explanation:

The average case time complexity of randomized quick sort is same as that of standard quick sort as randomized quick sort only helps in preventing the worst case. It is equal to O(n log n).

Once you are finished, click the button below. Any items you have not completed will be marked incorrect.

There are 5 questions to complete.