Data Structures Trees Question:
Download Questions PDF

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

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 Interview Questions And Answers PDF

Previous QuestionNext Question
How to find the depth of a binary tree?Explain B+ tree? Explain its uses?