Starting Out With C++: Early Objects (10th Edition)
Starting Out With C++: Early Objects (10th Edition)
10th Edition
ISBN: 9780135235003
Author: Tony Gaddis, Judy Walters, Godfrey Muganda
Publisher: PEARSON
Question
Book Icon
Chapter 19.2, Problem 19.7CP
Program Plan Intro

Tree Traversal:

Tree traversal is a process of visiting each node exactly only once in the binary search tree. It is categorized as,

  • In-order (left-root-right)
  • Pre-order (root-left-right)
  • Post-order (left-right-root)

In order traversal:

The traversal takes place from the left sub-tree to the root node and towards the right sub-tree.

Preorder traversal:

The traversal takes place from the root node to the left sub-tree and towards the right sub-tree.

Post order traversal:

The traversal takes place from the left sub-tree to the right sub-tree and towards the root node.

Blurred answer
Students have asked these similar questions
Describe the events that occur during a postorder traversal.
Describe the sequence of events in a preorder traversal.
Describe the sequence of events in a postorder traversal.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning