11 | 25 | 9 | 30 | 44 | 42 | 35 | 12 |
Merge sort is a sorting algorithm that sorts data items into ascending or descending order, which comes under the category of comparison-based sorting. The algorithm was invented by John von Neumann in 1945 and belongs to the divide-and-conquer technique.
Conceptually, a merge sort works as follows: