InterviewSolution
Saved Bookmarks
| 1. |
What will be the recurrence relation of the code of recursive bubble sort?(a) T(n) = 2T(n/2) + n(b) T(n) = 2T(n/2) + c(c) T(n) = T(n-1) + n(d) T(n) = T(n-1) + cI have been asked this question in an interview.Question is taken from Sorting in division Sorting of Data Structures & Algorithms II |
|
Answer» Right answer is (c) T(n) = T(n-1) + n |
|