Problem:
What is the asymptotic worst-case running time of MergeSort, as a function of the input array length n?
Solution:
Actually all recursion levels will take θ(n) time to create the merged arrays, so the time is obviously θ(nlogn) time.
What is the asymptotic worst-case running time of MergeSort, as a function of the input array length n?
Solution:
Actually all recursion levels will take θ(n) time to create the merged arrays, so the time is obviously θ(nlogn) time.
No comments:
Post a Comment