From the following code identify the which traversal of a binary tree is this…
2025
From the following code identify the which traversal of a binary tree is this __________
//if node has left child
order(node.left)
//if node has right child
order(node.right)
visit(node)
- A.
Inorder traversal
- B.
preorder traversal
- C.
postorder traversal
- D.
Euler tour traversal
Attempted by 216 students.
Show answer & explanation
Correct answer: C
Answer: c
Explanation: In a postorder traversal of a binary tree first is to traverse the left subtree, second traverse the right subtree of the tree and third is to visit the node.