Question
The recurrence relation T(n) = 2T(n/2) + O(n)
corresponds to which algorithm’s time complexity?Solution
Merge Sort divides in two (2T(n/2)) and merges in O(n), giving T(n)=O(n log n).
More Algorithms Questions
Identify the given logic and complete the series with the correct option. 12, 15, 18, 20,?
24 12 18 ? 157.5 708.75 3,898.125
24 25 34 59 108 ?
5 14 56 220 1125 6786
...57 59 66 94 157 ?
...63 189 315 378 567 693
...40 30 20 ? 7.5 4.375
35 57 101 189 ? 717
362 284 393 451 144 221
...98 219 75 244 ? 273