February 2020
Beginner to intermediate
616 pages
15h 16m
English
Postorder traversal requires the L, R, and V tasks to be applied to each node of the binary tree. Here, L means visiting the left child, R means visiting the right child, and V means visiting the node that is displaying its content.
The question is, how will we know which tasks have already been performed on a node and which tasks are left to be performed? To do so, we will use two arrays, nodeArray and valueArray. nodeArray contains the node that the tasks are to be performed one, while valueArray is used to indicate what task has been left on the corresponding node. valueArray can have one of the following two values:
Read now
Unlock full access