TYPE link=^node;
node=RECORD key:keytype; l
VAR all:boolean; n:integer; root:link;
FUNC num(t:link):integer;
BEGIN (
PROC chk(t:link;m{t 所指結點應有序號}:integer)
BEGIN (
BEGIN {建二叉樹
n:=num(root);{求結點數} all:=true; chk(root
IF all THEN writeln(
END
typedef struct node
{int data ; struct node *lchild
void EXCHANGE(btnode *bt)
{btnode *p
if (bt){ADDQ(Q
while(!EMPTY(Q))
{p=DELQ(Q); q=(
if(p
}
}
}//【北京科技大學
[
From:http://tw.wingwit.com/Article/program/sjjg/201311/23480.html