Analysis of Merge Sort
We'll cover the following...
Given that the merge function runs in mergeSort()
runs in
The divide step takes constant time, regardless of the subarray size. After all, the divide step just computes the midpoint
The conquer step, where we recursively sort two subarrays of approximately
The combine step merges a total of
If we ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy