engineering recuitment NIC NIELIT Scientist B 2023 Mock Test Algorithms Searching, Sorting and Hashing Sorting
Quick sort is run on 2 inputs shown below to sort in ascending order
A. 1, 2, 3……n
B. n, n – 1, n – 2 …… 1
Let C1 and C2 be the number of comparisons made for A and B respectively. Then
1
C1 > C2
2
C1 = C2
3
C1 < C2
4
Cannot say anything for arbitrary n