A list of n strings each of length n is sorted into lexicographic order using the merge sort algorithm. The worst case running time of this computation is?
I searched this question and everywhere I found the answer to be: O(n2logn).
While my approach is as follows:
Comparing two strings require O(n) comparisons, hence each merge will take O(n2) time.
So, the recurrence equation will be:
T(n) = 2T(n/2) + O(n2)
Therefore, by Master Method:
T(n) = O(n2).
Correct me where I am wrong.