In preorder traversal of a binary tree the second step is ____________
2024
In preorder traversal of a binary tree the second step is ____________
- A.
traverse the right subtree
- B.
traverse the left subtree
- C.
traverse right subtree and visit the root
- D.
visit the root
Attempted by 269 students.
Show answer & explanation
Correct answer: B
Answer: b
Explanation: In a preorder traversal of a binary tree first is to visit the root, second traverse the left subtree of the tree and third traverse the right subtree of the tree.