This commit is contained in:
e2hang
2025-08-10 23:25:13 +08:00

View File

@@ -100,8 +100,7 @@ void maxHblt<T>::display() {
//重要 -> 合并两个子树把y合并进入x
//* &x指针的引用表示指针可以修改传入函数
template<class T>
void maxHblt<T>::meld(binaryTreeNode<std::pair<int, T>>*& x,
binaryTreeNode<std::pair<int, T>>*& y) {
void maxHblt<T>::meld(binaryTreeNode<std::pair<int, T>>*& x, binaryTreeNode<std::pair<int, T>>*& y) {
if (y == nullptr) return;
if (x == nullptr) {
x = y;