Traversal of Tree
Traversal of Tree
1) Tree is a non linear data structure 2) It is mainly used to represent data containing hierarchical relationship between elements 3) EG. records , family tree , table of contents
Diagram of a tree
TRAVERSAL of tree
The most common operation performed on a binary tree is to traverse in a binary tree or visit each node of the binary tree. There are 3 ways available to traverse a tree Traversing can be done in three ways:-1) Pre order 2) In order 3) Post order
Level 3
Fig 2