hello-algo/docs/chapter_sorting
GN-Yu 4ca09c1015
Update merge_sort.md
修改了代码注释使其表述更严谨,如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++];
        }
2022-12-29 17:50:02 -05:00
..
bubble_sort.assets Update figures. 2022-12-10 02:29:44 +08:00
insertion_sort.assets Update figures. 2022-12-10 02:29:44 +08:00
intro_to_sort.assets Update table of content 2022-12-11 03:06:22 +08:00
merge_sort.assets Add merge sort, and sorting algorithm. 2022-11-24 01:12:14 +08:00
quick_sort.assets Update figures. 2022-12-10 02:29:44 +08:00
bubble_sort.md Fine tune 2022-12-27 20:11:22 +08:00
insertion_sort.md Fine tune 2022-12-24 16:15:41 +08:00
intro_to_sort.md Update intro_to_sort.md 2022-12-16 17:05:07 +08:00
merge_sort.md Update merge_sort.md 2022-12-29 17:50:02 -05:00
quick_sort.md Update C# code. 2022-12-24 17:05:58 +08:00
summary.md Add merge sort, and sorting algorithm. 2022-11-24 01:12:14 +08:00