1.

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 rootThe question was posed to me in my homework.The query is from Tree Traversal topic in section Trees of Discrete Mathematics

Answer»

Correct option is (b) TRAVERSE the left subtree

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.



Discussion

No Comment Found

Related InterviewSolutions