Bottom-Up Merge Sort
Merge sort with no recursion, doubling the run width on every pass.
Merge Sort: Eight values
Pass 2. Every run of 2 values is now sorted, so merge them in pairs.
Cost
- Best
- O(n log n)
- Average
- O(n log n)
- Worst
- O(n log n)
- Space
- O(n)
Properties
- Yes: Comparison based
- Yes: Stable
- No: In place
- No: Adaptive
- No: Online
Before this
A variant of
Taught by the same lesson
Merge Sort covers these too, in the same run.