Post-Order Traversal
In this lesson, we will cover Post-Order Traversal in a Binary Search Tree and implement it in Python
We'll cover the following
Introduction #
In post-order traversal, the elements are traversed in “left-right-root” order. We first visit the left child, then the right child, and then finally the root/parent node. Here is a high-level description of the post-order traversal algorithm,
-
Traverse the left sub-tree of the ‘currentNode’ recursively by calling the
postOrderPrint()
function on it. -
Traverse the right sub-tree of the ‘currentNode’ recursively by calling the
postOrderPrint()
function on it. -
Visit current node and print its value
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.