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