mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-11 15:06:07 +00:00
Polish the chapter
introduction, computational complexity.
This commit is contained in:
@@ -19,7 +19,7 @@ fn sift_down(nums: &mut [i32], n: usize, mut i: usize) {
|
||||
if r < n && nums[r] > nums[ma] {
|
||||
ma = r;
|
||||
}
|
||||
// 若节点 i 最大或索引 l, r 越界,则无需继续堆化,跳出
|
||||
// 若节点 i 最大或索引 l, r 越界,则无须继续堆化,跳出
|
||||
if ma == i {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user