Skip to Main Content
Data Structures Using C, 2nd Edition by Pearson
book

Data Structures Using C, 2nd Edition by Pearson

by A. K. Sharma
May 2024
Intermediate to advanced content levelIntermediate to advanced
521 pages
14h 12m
English
Pearson India
Content preview from Data Structures Using C, 2nd Edition by Pearson
296 Data Structures Using C
7.4.3.2 Preorder Travel (V-L-R) This order of travel, i.e., V-L-R requires that while travelling the
binary tree, the data of the visited node be processed first before the left sub-tree of a node is travelled.
Thereafter, its right sub-tree is travelled.
Consider the binary tree given in Figure 7.18.
Its root node is pointed by a pointer called Tree.
The travel starts from root node A and its
data is processed (V). As it has a left child, we
move to B (L) and its data is processed (V). As
B has no left child, the right child of B needs
to be travelled which is also NULL. Thus, the
travel of B is complete and
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Structures Using C

Data Structures Using C

Samir Kumar Bandyopadhyay, Kashi Nath Dey
Intermediate C Programming, 2nd Edition

Intermediate C Programming, 2nd Edition

Yung-Hsiang Lu, George K. Thiruvathukal

Publisher Resources

ISBN: 9781299831582