Which of the following tree traversal visits root node last?
1) inorder
2) preorder
3) postorder
4) None of the above
Answers
Answered by
17
Option 3.
Plz mark me as the brainliest.
Answered by
0
In post-order tree traversal, the root node is visited last. (option 3)
- The binary tree is the non-linear type data structure where the data items are not organized sequentially.
- Hence, we can't traverse a binary tree, like we traverse a linked list or arrays where the data are organized sequentially, but it requires a different approach.
- The traversal of the binary tree simply involves visiting each node of the tree exactly once.
- There are commonly three methods that are used for traversal of binary trees i.e. In-order traversal, pre-order traversal, post-order traversal.
- For traversing a non-empty binary tree in post order, we need to perform a particular three operations in the following order:
- Traverse or visit the left sub-tree in post-order.
- Traverse or visit the right sub-tree in post-order.
- Root node is visited last.
Similar questions
History,
6 months ago
English,
6 months ago
Social Sciences,
1 year ago
Science,
1 year ago
Political Science,
1 year ago