|
-
Feb 6th, 2002, 11:08 AM
#1
Thread Starter
Addicted Member
Size of a Tree
Does anyone know what the 'size' of a Binary Tree is?
By that I mean is it the number of nodes contained in it, or the height?
I don't think it means the height of a tree but you never know...
"'Oh, hello Mr. Crick! What do you think of Jeffrey Archer?' Clip-clip-clip! Oh, come on! Who are you kidding? You wait til I'm mayor, you'll see how tough I am! Christ almighty...."
-
Feb 6th, 2002, 11:52 AM
#2
Addicted Member
I suppose size could mean almost anything. I think one important metric would be the number of bytes that comprise the tree, which should be the number of nodes times the number of bytes per node.
cudabean
-
Feb 6th, 2002, 11:55 AM
#3
Hyperactive Member
Size = depth of the tree in almost all the cases I have seen.
-
Feb 6th, 2002, 12:15 PM
#4
Thread Starter
Addicted Member
Well, I think the size has got something to do with the number of nodes as opposed to the memory that the Tree takes up.
Last week we were asked to write a method that computed the height of a Tree and it seems strange that we would be asked to do it again.
"'Oh, hello Mr. Crick! What do you think of Jeffrey Archer?' Clip-clip-clip! Oh, come on! Who are you kidding? You wait til I'm mayor, you'll see how tough I am! Christ almighty...."
-
Feb 6th, 2002, 01:13 PM
#5
Hyperactive Member
i would go with number of nodes if it isnt the depth aka height.
-
Feb 7th, 2002, 08:14 AM
#6
Thread Starter
Addicted Member
Probably have to traverse the tree from left to right until you find the last node, then mark that as the deepest point.
"'Oh, hello Mr. Crick! What do you think of Jeffrey Archer?' Clip-clip-clip! Oh, come on! Who are you kidding? You wait til I'm mayor, you'll see how tough I am! Christ almighty...."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|