mirror of
https://github.com/hao14293/2021-Postgraduate-408.git
synced 2026-02-02 18:20:30 +08:00
10 lines
137 B
C++
10 lines
137 B
C++
void swap(BiTree b){
|
|
if(b){
|
|
swap(b->lchild);
|
|
swap(b->rchild);
|
|
temp = b->lchild;
|
|
b->lchild = b->rchild;
|
|
b->rchild = temp;
|
|
}
|
|
}
|