Find Two Trees are Identical - Binary Tree Questions
Two trees are identical when they have same data and there physical layout is also same.
To identify if two trees are identical, we need to traverse both trees simultaneously, and while traversing we need to compare data and children of the trees.
Read full article from Find Two Trees are Identical - Binary Tree Questions
No comments:
Post a Comment