What is traversal of Tree? tccicomputercoaching.com
- June 20, 2019
- Posted by: Riddhi Dhandha
- Category: Data Structure at TCCI
Traversal is a process to visit all the nodes of a tree and may print their values too. Because, all nodes are connected via edges (links) we always start from the root (head) node. That is, we cannot randomly access a node in a tree.
There are three ways which we use to traverse a tree –
- In-order Traversal
- Pre-order Traversal
- Post-order Traversal
Generally, we traverse a tree to search or locate a given item or key in the tree or to print all the values it contains.
We believe in Student satisfaction.
Call us @ 9825618292
Visit us @ www.tccicomputercoaching.com