.具有n個結點的完全二叉樹已經順序存儲在一維數組A[n]中下面算法是將A中順序存儲變為二叉鏈表存儲的完全二叉樹請填入適當的語句在下面的_______上完成上述算法
TYPE ar=ARRAY[n] OF datatype;
pointer=RECORD data:datatype; lchild rchild: pointer; END;
PROCEDURE btree(VAR a: ar; VAR p:pointer);
VAR i:integer;
PROCEDURE createtree(VAR t: pointer;i: integer)
BEGIN ()_______; t^data=a[i];
IF()_______THEN creattree(()_______) ELSE t^lchild:=NIL;
IF()_______THEN createtree(()_______) ELSE t^rchild:=NIL;
END;
BEGIN
j:= ()_______; createtree(pj)
END;【北京郵電大學 五 (分)】
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
From:http://tw.wingwit.com/Article/program/sjjg/201311/23476.html