Google News
logo
Algorithm - Quiz(MCQ)
For the Quick sort algorithm, what is the time complexity of the best/worst case?
A)
best case: O(log(n)) worst case: O(n2)
B)
best case: O(n2), worst case: O(n log(n))
C)
best case: O(n log(n) ) worst case: O(n2)
D)
best case: O(n2), worst case: O(n2log(n) )

Correct Answer :   best case: O(n log(n) ) worst case: O(n2)

Advertisement