-->
当前位置:首页 > 题库

程序填空题:Merge two equal-sized binomial trees

Luz5年前 (2021-05-10)题库563
The function is to merge two equal-sized binomial trees T1 and T2.

```c++
BinTree CombineTrees( BinTree T1, BinTree T2 )
{
if ( T1->Element > T2->Element )
return CombineTrees( T2, T1 );
T2->NextSibling = @@[T1->LeftChild](3);
@@[T1->LeftChild = T2](3);
return T1;
}

```





答案:
第1空:T1->LeftChild

第2空:T1->LeftChild = T2