Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure copy(T:tree);
- begin
- if T<>nil then
- begin
- new(T^);
- T^^.elem:=T^.elem;
- copy(T^.left,T^^.left);
- copy(T^.right,T^^.right);
- {T^^.right:=nil;
- T^^.left:=nil;}
- end;
- T^:=nil;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement