This commit is contained in:
2025-08-10 18:18:31 +08:00
parent 023973b5a1
commit 409258a8a0

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;