2080 4

BIT152 ยท 2080 ยท 5 marks

Describe pre-order, postorder and inorder traversal of a tree with an example.

Describe pre-order, postorder and inorder traversal of a tree with an example. [5]

Discrete StructureChapter 9: Trees and Graph AlgorithmsTree traversal methods

Tree traversal means visiting every node of a tree exactly once in a systematic way. The three standard depth-first traversal methods differ in when the root (parent) node is visited relative to its subtrees. --- --- Algorithm: 1. Visit the root node 2. Recursively traverse the left subtree 3. Re...