UGC NET CS 2009-June-Paper-2
May 1, 2024Transactions
May 1, 2024Question 10489 – Algorithms
Assume that the last element of the set is used as partition element in Quicksort. If n distinct elements from the set [1…..n] are to be sorted, give an input for which Quicksort takes maximum time.
Correct Answer: A
Question 41 Explanation:
For n distinct elements the algorithm will take maximum time when:
→ The array is already sorted in ascending order.
→ The array is already sorted in descending order.
→ The array is already sorted in ascending order.
→ The array is already sorted in descending order.
n
Subscribe
Login
0 Comments