- Goal: Practice the merge sort algorithm by manually merging smaller sorted arrays into larger ones.
- How merge sort works: Start with single elements at the bottom, merge pairs into sorted arrays of 2, then merge those into arrays of 4, and so on until you have one completely sorted array.
-
To merge two arrays:
- Click on the smaller value from either left or right subarray
- Click on the next empty position in the merged array above
- Repeat until both subarrays are empty
-
Rules:
- Always choose the smallest available value from the front of either subarray
- You can only merge into the array directly above (one level up)
- If you make a mistake, you'll be prompted to try again
- Controls:
- Click Reset to start over with a new random array
- Click Get Answer to see the correct sequence of moves