CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
15
You visited us 15 times! Enjoying our articles? Unlock Full Access!
Question

Top to down traversing of tree is

A
Preorder
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
Inorder
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Postorder
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
all of the above
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A Preorder

Top to down traversing of tree is preorder.

Tree traversing:-

In computer science, tree traversal (also known as tree search) is a form of Graph traversal and refers to the process of visiting (checking and/or updating) each node in a tree data structure, exactly once. Such traversals are classified by the order in which the nodes are visited.

Preorder traversal is used to create a copy of the tree. Preorder traversal is also used to get prefix expression on of an expression tree.



flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Pictographs
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon