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

Top to down traversing of tree is called

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

The correct option is B Preorder

Top to down traversing of tree is called Preorder.

Tree traversal is a form of graph traversal and refers to the process of visiting each node in a tree data structure, exactly once. Such traversals are classified by the order in which the nodes are visited.

Unlike linear data structures (Array, Linked List, Queues, Stacks, etc) which have only one logical way to traverse them, trees can be traversed in different ways. 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.


923081_917796_ans_9ffe1d0f940245deb1bfd79239b37a9b.PNG

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