Regular Languages
Context-Free Languages
Preferences
For the best experience, we recommend using a widescreen desktop
A divide-and-conquer algorithm that splits, sorts, and merges subarrays.
Step 1 of 39
Starting Merge Sort. Divide the array in half, sort each half, then merge.
Legend
The auxiliary array below shows the temporary buffer used during merging. Elements are copied in, compared, and written back to the main array.