Question 10667 – Sorting
April 18, 2024
Question 10590 – Sorting
April 18, 2024
Question 10667 – Sorting
April 18, 2024
Question 10590 – Sorting
April 18, 2024

Question 10618 – Sorting

Let P be a quicksort program to sort numbers in ascending order. Let t1 and t2 be the time taken by the program for the inputs [1 2 3 4] and [5 4 3 2 1] respectively. Which of the following holds?

Correct Answer: C

Question 15 Explanation: 
Since both are in sorted order and no. of elements in second list is greater.
A
t1 = t2
B
t1 > t2
C
t1 < t2
D
t1 = t2 + 5 log 5

Leave a Reply

Your email address will not be published. Required fields are marked *