mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-24 18:43:59 +08:00
build
This commit is contained in:
@@ -4,7 +4,7 @@ comments: true
|
||||
|
||||
# 11.6 归并排序
|
||||
|
||||
「归并排序 Merge Sort」基于分治思想实现排序,包含“划分”和“合并”两个阶段:
|
||||
「归并排序 merge sort」基于分治思想实现排序,包含“划分”和“合并”两个阶段:
|
||||
|
||||
1. **划分阶段**:通过递归不断地将数组从中点处分开,将长数组的排序问题转换为短数组的排序问题。
|
||||
2. **合并阶段**:当子数组长度为 1 时终止划分,开始合并,持续地将左右两个较短的有序数组合并为一个较长的有序数组,直至结束。
|
||||
|
||||
Reference in New Issue
Block a user