mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-19 15:00:58 +00:00
Bug fixes and improvements (#1380)
* preorder, inorder, postorder -> pre-order, in-order, post-order * Bug fixes * Bug fixes * Update what_is_dsa.md * Sync zh and zh-hant versions * Sync zh and zh-hant versions. * Update performance_evaluation.md and time_complexity.md * Add @khoaxuantu to the landing page. * Sync zh and zh-hant versions * Add @ khoaxuantu to the landing page of zh-hant and en versions.
This commit is contained in:
@@ -48,7 +48,7 @@ fn mergeSort(nums: []i32, left: usize, right: usize) !void {
|
||||
// 終止條件
|
||||
if (left >= right) return; // 當子陣列長度為 1 時終止遞迴
|
||||
// 劃分階段
|
||||
var mid = left + (right - left) / 2; // 計算中點
|
||||
var mid = left + (right - left) / 2; // 計算中點
|
||||
try mergeSort(nums, left, mid); // 遞迴左子陣列
|
||||
try mergeSort(nums, mid + 1, right); // 遞迴右子陣列
|
||||
// 合併階段
|
||||
|
||||
Reference in New Issue
Block a user