mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-21 15:57:14 +00:00
build
This commit is contained in:
@@ -650,7 +650,7 @@ comments: true
|
||||
|
||||
/* 获取父节点的索引 */
|
||||
int parent(MaxHeap *maxHeap, int i) {
|
||||
return (i - 1) / 2;
|
||||
return (i - 1) / 2; // 向下取整
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user