mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-10 22:46:07 +00:00
Fix some code bugs (#1021)
* fix(counting_sort.c): Fix access out-of-bounds issue * fix(hash_map_open_addressing.c): Fix coding errors * fix(binary_search_tree.c): Fix unreleased memory * Update indentataion
This commit is contained in:
@@ -117,6 +117,8 @@ void removeItem(BinarySearchTree *bst, int num) {
|
||||
} else {
|
||||
pre->right = child;
|
||||
}
|
||||
// 释放内存
|
||||
free(cur);
|
||||
} else {
|
||||
/* 子节点数量 = 2 */
|
||||
// 获取中序遍历中 cur 的下一个节点
|
||||
|
||||
Reference in New Issue
Block a user