« Theoretical analysis for time complexity of merge sort algorithm

Time complexity of Merge Sort

T(n) = 2T(n/2) + kn

recurrence_relation_merge_sort.jpg

T(n) = 2T(n/2) + kn

T(n/2) = 2T(n/4) + k(n/2)

T(n/4) = 2T(n/8) + k(n/8)

...

T(1) = k

Lets solve above equations:

recurrence_relation_merge_sort_solving.jpg

T(n) = nlog(n)