提交 2472d343 编写于 作者: GreyZeng's avatar GreyZeng

update notes

上级 b1904b25
package git.snippet.mergesort;
/**
* 归并排序
*
* <p>1)整体是递归,左边排好序+右边排好序+merge让整体有序
*
* <p>2)让其整体有序的过程里用了排外序方法
*
* <p>3)利用master公式来求解时间复杂度
*
* <p>T(N) = 2*T(N/2) + O(N^1)
*
* <p>根据master可知时间复杂度为O(N*logN)
*
* <p>merge过程需要辅助数组,所以额外空间复杂度为O(N)
*
* <p>归并排序的实质是把比较行为变成了有序信息并传递,比O(N^2)的排序快
*/
//归并排序
//1)整体是递归,左边排好序+右边排好序+merge让整体有序
//2)让其整体有序的过程里用了排外序方法
//3)利用master公式来求解时间复杂度
//T(N) = 2*T(N/2) + O(N^1)
//根据master可知时间复杂度为O(N*logN)
//merge过程需要辅助数组,所以额外空间复杂度为O(N)
//归并排序的实质是把比较行为变成了有序信息并传递,比O(N^2)的排序快
// 笔记:https://www.cnblogs.com/greyzeng/p/16653063.html
public class Code_MergeSort {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册