Define the pre-order and in-order tree traversal

Define the pre-order and in-order tree traversal.

E

Expert

Verified

A non-empty binary tree is traversed within following types, as like pre-order, post-order and in-order within a recursive fashion.

In-Order:

In order procedure is as given below:

• Traverse there left sub tree

• Visit the certain root node

• Traverse the right sub tree

Pre-order:

Pre-order process is as given below:

• Visit that root node

• Traverse there left sub tree

• Traverse there right sub tree.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.