- #1
zak100
- 462
- 11
Homework Statement
In the book it gives following background for using threaded trees:
"The concern is that some additional time has to be spent to maintain the stack & some more space has to be set aside for the stack itself."
& then it says
"It is more efficient to incorporate the stack as part of the tree. This is done by incorporating threads in a given node"
From first sentence "It is more efficient to incorporate the stack as part of the tree" it looks as if stack is utilized in the threaded tree but i can't understand what it means " incorporate stack as part of tree" but in the next sentence it says "This is done by incorporating threads in a given node". By threads we mean pointers which point to the inorder successor & inoder predecessor. They are not stack. So this is my problem that i can't understand whether stack is used in a threaded tree or not
Homework Equations
No equations, only theory.
The Attempt at a Solution
I think stack is present but at the same time it has threads/pointers also which help in efficient traversal
Some body please guide me.
Zulfi.