1/30/2024
Merge Sort with Bottom Up approach #2nd attempt
This is my second attempt at solving the problem Sort an Array using a bottom-up approach. Let me try to explain what it does again.
Basically, the algorithm merges each pair of the sub-arrays into a bigger sorted array, going from the size of 1 until it almost reaches the size of the original array, double the size after each iteration. During the last iteration, it merges an array with the size of 2 to the power of something almost equal to the size of the original array to the rest of the array (which is already sorted).
During each iteration, the algorithm goes over the original array, from index 0 to the last one, considers each pair of size sz, and merges them in a sorted order.