Data Structures Trees Question:

What is pre-order and in-order tree traversal?

Tweet Share WhatsApp

Answer:

A non-empty binary tree is traversed in 3 types, namely pre-order, in-order and post-order in a recursive fashion.

Pre-order:
Pre-order process is as follows:

- Visit the root node
- Traverse the left sub tree
- Traverse the right sub tree

In-Order:
In order process is as follows:

- Traverse the left sub tree
- Visit the root node
- Traverse the right sub tree

Download Data Structures Trees PDF Read All 14 Data Structures Trees Questions
Previous QuestionNext Question
How to find the depth of a binary tree?Explain B+ tree? Explain its uses?