Filter by year

Quick Sort questions

Q15

GATE DA 2026 DADivide and ConquerMCQ1 mark−1/3 if wrong

Report a problem with Q15

What is wrong?
Consider that the quick sort algorithm is used to sort an array of nn distinct randomly ordered elements. In every call, the pivot is chosen as the first element of the current subarray.
Let T(n)T(n) denote the expected time to sort the array. Assume that the time to partition is linear in the size of the current subarray.
Which of the following recurrence relations correctly represents T(n)T(n) in this scenario?
Show answer without attempting

Loading the answer…

Q30

GATE DA 2024 DADivide and ConquerNAT1 mark

Report a problem with Q30

What is wrong?
Consider sorting the following array of integers in ascending order using an in-place Quicksort algorithm that uses the last element as the pivot.
60708090100
The minimum number of swaps performed during this Quicksort is ______.
Show answer without attempting

Loading the answer…

0/20 correct0 marks