Q:

What is recurrence for worst case of QuickSort and what is the time complexity in Worst case?

0

What is recurrence for worst case of QuickSort and what is the time complexity in Worst case?


  1. Recurrence is T(n) = T(n-2) + O(n) and time complexity is O(n^2)
  2. Recurrence is T(n) = 2T(n/2) + O(n) and time complexity is O(nLogn)
  3. Recurrence is T(n) = T(n-1) + O(n) and time complexity is O(n^2)
  4. Recurrence is T(n) = T(n/10) + T(9n/10) + O(n) and time complexity is O(nLogn)

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:

Recurrence is T(n) = T(n-1) + O(n) and time complexity is O(n^2)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now