Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function count(tmp: TTree): integer;
- var left,right: integer;
- begin
- if tmp.left = nil then left:=0 else left:=count(tmp.left);
- if tmp.right = nil then right :=0 else right:= count(tmp.right);
- result:= 1+max(left,right);
- end;
Advertisement
Add Comment
Please, Sign In to add comment