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 $ \theta(n) $ time to create the merged arrays, so the time is obviously $ \theta(n \log n) $ 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 $ \theta(n) $ time to create the merged arrays, so the time is obviously $ \theta(n \log n) $ time.
No comments:
Post a Comment