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 }