mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-27 20:11:01 +08:00
build
This commit is contained in:
@@ -14,7 +14,7 @@ comments: true
|
||||
1. **分**:递归地将原数组(原问题)划分为两个子数组(子问题),直到子数组只剩一个元素(最小子问题)。
|
||||
2. **治**:从底至顶地将有序的子数组(子问题的解)进行合并,从而得到有序的原数组(原问题的解)。
|
||||
|
||||

|
||||
{ class="animation-figure" }
|
||||
|
||||
<p align="center"> 图 12-1 归并排序的分治策略 </p>
|
||||
|
||||
@@ -46,7 +46,7 @@ $$
|
||||
O(n + (\frac{n}{2})^2 \times 2 + n) = O(\frac{n^2}{2} + 2n)
|
||||
$$
|
||||
|
||||

|
||||
{ class="animation-figure" }
|
||||
|
||||
<p align="center"> 图 12-2 划分数组前后的冒泡排序 </p>
|
||||
|
||||
@@ -74,7 +74,7 @@ $$
|
||||
|
||||
比如在图 12-3 所示的“桶排序”中,我们将海量的数据平均分配到各个桶中,则可所有桶的排序任务分散到各个计算单元,完成后再进行结果合并。
|
||||
|
||||

|
||||
{ class="animation-figure" }
|
||||
|
||||
<p align="center"> 图 12-3 桶排序的并行计算 </p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user