In preorder traversal of a binary tree the second step is ____________

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
 
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.
 

Tìm kiếm

Back
Top