Show that the running time of the merge sort algorithm on nelement sequence is O(n log n), even when n is not a power of 2.Please explain simplistically.
Answer
merge sort makes two recursive calls of size n/2. 2T(n/2)and merge operation takes O(n) operations.so, recurrence relation is T(n) = 2T(n/2) + O(n)so, what ever the value of n is, time complexity of merge sort is O(n log n)T(n) 2T(n/2)
OR
OR