What is pre-order and in-order tree traversal?
Submitted by: AdministratorA 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
Submitted by: Administrator
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
Submitted by: Administrator
Read Online Data Structures Trees Job Interview Questions And Answers
Top Data Structures Trees Questions
☺ | Explain red-black trees? |
☺ | How to find the depth of a binary tree? |
☺ | What is threaded binary tree. Explain its common uses? |
☺ | Do you know implementation of traversal of a binary tree? |
☺ | Explain B+ tree? Explain its uses? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |