Answer:
In a threaded binary tree, if a node 'A' has a right child 'B' then B's left pointer must be either a child, or a thread back to A.
In the case of a left child, that left child must also have a left child or a thread back to A, and so we can follow B's left children until we find a thread, pointing back to A.
This data structure is useful when stack memory is less and using this tree the treversal around the tree becomes faster.
In the case of a left child, that left child must also have a left child or a thread back to A, and so we can follow B's left children until we find a thread, pointing back to A.
This data structure is useful when stack memory is less and using this tree the treversal around the tree becomes faster.
Previous Question | Next Question |
Explain red-black trees? | Explain a B+ tree? |