1. Find midpoint m of range
2. Sort [b,m) with recursive call
3. Sort [m,e) with recursive call
4. Merge ranges [b,m) and [m,e) to [b,e)
|
divide here (m = 10/2 = 5)
|
[0,10) = [20 10 40 50 20 90 10 80 70]
[0,5) = [20 10 40 50 20] -> [10 20 20 40 50]
[5,10) = [90 10 80 70] -> [10 70 80 90]
[0,10) = [10 10 20 20 40 50 70 80 90]
|