File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Traversals/Inorder Preorder Postorder Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 3030
3131 1. The tree is made manually here, to focus on traversal part.
3232 2. The program is then run to print the Inorder, Preorder, and Postorder traversal of the tree.
33+
34+ ## Conclusion:
35+ There are three standard traversal for traversing in a Binary tree:
36+
37+ 1. Inorder,
38+ 2. Preorder, and
39+ 3. Postorder
40+
41+ If we consider 'A' as the left child, '+' as the root node, and 'B' as the right child, then
42+ -> In Inorder Traversal, the traversing is done in the A+B fashion.
43+ -> In Preorder Traversal, the traversing is done in the +AB fashion.
44+ -> In Postorder Traversal, the traversing is done in the AB+ fashion.
3345
3446# Output
3547![ Output] ( ./images/output.png )
3648
37- <p align = " center " >--- Contributed with 🧡 by <a href = " https://github.com/motasimmakki " >Motasim</a > ---</p >
49+ <p align = " center " >--- Contributed with 🧡 by <a href = " https://github.com/motasimmakki " >Motasim</a > ---</p >
You can’t perform that action at this time.
0 commit comments