Author name: Abhay

Binary Tree Traversal Algorithm Without Recursion

In this tutorial, you will learn the implementation of different tree traversal algorithms, which were specified recursively in the last tutorial, by means of non-recursive procedures using stacks. Pre-order Traversal Without Recursion The following operations are performed to traverse a binary tree in pre-order using a stack: Start with root node and push onto stack.

Binary Tree Traversal Algorithm Without Recursion Read More »

Binary Tree Traversal Algorithms

This tutorial discusses different ways for traversing a binary tree (pre-order, post-order, in-order) with algorithms. Binary Tree Traversal A binary tree can be traversed in three different ways, namely, pre-order, post-order and in-order. The order in which the nodes are visited differs between these techniques. In-order Traversal of Binary Tree The following operations are done

Binary Tree Traversal Algorithms Read More »