recategorized by
15,205 views
45 votes
45 votes

Let $P$ be a quicksort program to sort numbers in ascending order. Let $t_{1}$ and $t_{2}$ be the time taken by the program for the inputs $\left[1 \ 2 \ 3 \ 4\right]$ and $\left[5 \ 4 \ 3 \ 2 \ 1\right]$, respectively. Which of the following holds?

  1. $t_{1} = t_{2}$
  2. $t_{1} > t_{2}$
  3. $t_{1} < t_{2}$
  4. $t_{1}=t_{2}+5 \log 5$ 
recategorized by

5 Answers

–1 votes
–1 votes
They said that time taken by input 1 and 2 are t1 and t2 not time complexity. So we consider value here.
Answer:

Related questions

43 votes
43 votes
4 answers
7
Kathleen asked Sep 14, 2014
13,803 views
Randomized quicksort is an extension of quicksort where the pivot is chosen randomly. What is the worst case complexity of sorting n numbers using Randomized quicksort?$O...