- 分享
- 2009-01-17 16:55:42 @
看看2X排序树哪错了???????????
program erxu;
const m=1000;
var n,p,i:integer;
a:array[1..m]of integer;
type
bitrpetr=^bnode;
bnode=record
data:integer;
lch,rch:bitrpetr;
end;
var
bt:bitrpetr;
procedure inorder(bt:bitrpetr);
begin
if btnil
then begin
inorder(bt^.lch);
write(bt^.data);
inorder(bt^.rch);
end;
end;
type
benode=record
data:integer;
l,r,i:0..m;
end;
var
b:array[1..m]of benode;
procedure creat;
begin
fillchar(b,sizeof(b),0);
b[1].data:=a[1];
for i:=b[2].data to n do
begin
b[i].data:=a[i];
p:=1;
while true do
begin
if a[i]
0 条评论
目前还没有评论...