Download presentation
Presentation is loading. Please wait.
1
Mergesort
2
Bottom up vs top down Typical mergesort (top-down) Traversal:
Post-order The top levels are a power of 2
3
Bottom up vs top down Bottom-up mergesort Traversal: level-order
All inputs apart from the final one are a power of 2
4
Bottom up vs top down Bottom up: creates sorted sub-inputs
Top down: sorts half input and proceeds to the other half Bottom up / top down
5
Bottom up with various input types
Random, small range, almost sorted, almost reversely sorted, many duplicates Time to execute: independent of input type, depends only on input size
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.