MERGE SORT
1 Merging
Before looking at the merge sort algorithm to sort n records, let us see how one may merge two sorted lists to get a single sorted list.
we'll see two different algorithms for this. The first one is very simple and uses O(n) addtional space.
申请新一内存空间保存从两序列中元素比较的结果,此方法比较简单,时间复杂度为O(n) = O(r-p),对应于两序列长度之和。