标签:return null turn lse bin roo swa temp 交换
1 root是根节点 2 BiNode * temp, * root1; 3 void swap(BiNode root1){ 4 if(root1 == NULL) return; 5 else{ 6 temp = root1->lchild; 7 root1->lchild = root1->rchild; 8 root1->rchild = temp; 9 swap(root1->lchild); 10 swap(root1->rchild); 11 } 12 }
标签:return null turn lse bin roo swa temp 交换
原文地址:https://www.cnblogs.com/moomcake/p/10034433.html