//將二叉樹逆時針旋轉
IF bt<>NIL THEN [ print(bt↑
writeln(bt
print(bt↑
ENDP;
{scanf(
BiTree bst=null
while(ch!=
{s=(BiTree)malloc(sizeof(BiNode)); //申請結點
s
if (bst==null) bst=s; //根結點
else //查找插入結點
{p=bst;
while(p)
if (ch>p
else {f=p; p=p
if(f
scanf(
} //while (ch!=
return(bst); } //結束 creat
void InOrder(BiTree bst) //bst是二叉排序樹
{if(bst)
{InOrder (bst
}//結束InOrder
[
From:http://tw.wingwit.com/Article/program/sjjg/201311/23723.html