February 2020
Beginner to intermediate
616 pages
15h 16m
English
For postorder traversal of a binary tree, we need to apply three tasks—L, R, and V—on each of the tree nodes. These tasks are as follows:
To find out which tasks between L, R, and V are pending and which have already been performed, we will use two stacks: one for storing the node and another for storing an integer value of 0 or 1. Let's go over what 0 and 1 indicate:
Follow these steps to perform postorder tree traversal:
Read now
Unlock full access