"Merge Sort" Here we use recursive algorithm to keep the list in two, base case is no element in the list or only one element, because this sub-list is bound to be a positive sequence, and then gradually merge the two sorted sub-list into a new positive sequence table, until all the elements sorted.
"This is a process from the bottom up (bottom-up)
Divides the list from the middle into two sub-lists until it reaches the bottom, with only one element in the sub-list
Then, the two sub-lists are merged from bottom to top, and all the elements of the two sub-lists are sorted to form a new list.
"Implementation of merge Sort"
You can use print to see what you've done with each step.
"Performance Analysis"
The time complexity is O (n*log N), but the merging process requires extra space and the space complexity is O (n).
"Python Learning notes-data structures and algorithms" merge sort