Quantcast
Channel: Efstathios Chatzikyriakidis » stack
Viewing all articles
Browse latest Browse all 6

Implementation of algorithms (without recursion) for preorder & level-order traversal of binary trees.

$
0
0
The iterative (non-recursive) function preorderTreeTraverse() can perform preorder traversing of a binary tree with the help of a stack that can hold pointers to nodes of the tree. Also, the iterative (non-recursive) function layerTreeTraverse() can perform level-order traversing of a binary tree with the help of a queue that can hold pointers to nodes of […]

Viewing all articles
Browse latest Browse all 6

Trending Articles