归并排序
摘要:归并排序 整体上是递归,左边排好序+右边排好序+merge让整体有序 让其整体有序的过程里用来排外序方法 利用master公式来求解时间复杂度 当然可以用非递归实现 例:无序数组arr[L.....R]排序 master:T(N) = 2*T(N/2)+O(N),为什么是N呢,因为这个数组总长度是N
阅读全文
posted @ 2022-08-18 22:38
posted @ 2022-08-18 22:38
posted @ 2022-08-18 22:34
posted @ 2022-08-18 22:31