mirror of
https://github.com/krahets/hello-algo.git
synced 2025-01-24 06:50:26 +08:00
4ca09c1015
修改了代码注释使其表述更严谨,如C++中: for (int k = left; k <= right; k++) { // 若“左子数组已全部合并完”,则选取右子数组元素,并且 j++ if (i > leftEnd) nums[k] = tmp[j++]; // 否则,若“右子数组已全部合并完”或“左子数组元素 <ins> <= </ins> 右子数组元素”,则选取左子数组元素,并且 i++ else if (j > rightEnd || tmp[i] <= tmp[j]) nums[k] = tmp[i++]; // 否则,若<ins>“左右子数组都未全部合并完”且“左子数组元素 > 右子数组元素”</ins>,则选取右子数组元素,并且 j++ else nums[k] = tmp[j++]; } |
||
---|---|---|
.. | ||
bubble_sort.assets | ||
insertion_sort.assets | ||
intro_to_sort.assets | ||
merge_sort.assets | ||
quick_sort.assets | ||
bubble_sort.md | ||
insertion_sort.md | ||
intro_to_sort.md | ||
merge_sort.md | ||
quick_sort.md | ||
summary.md |