1.

Quicksort is run on two inputs shown below to sort in ascending order taking first element as pivot,(i) 1, 2, 3,......., n(ii) n, n-1, n-2,......, 2, 1 Let C1 and C2 be the number of comparisons made for the inputs (i) and (ii) respectively. Then,(A) C1 < C2(B) C1 > C2(C) C1 = C2(D) We cannot say anything for arbitrary n

Answer»


Discussion

No Comment Found

Related InterviewSolutions