First divide the list into the smallest unit (1 element), then compare each element with the adjacent list to sort and merge the two adjacent lists. Finally all the elements are sorted and merged.
Efficiency
Efficiency
- Worst case performance O(n log n)
- Best case performance O(n log n)
- Average case performance O(n log n)
No comments:
Post a Comment