Post-Order Traversal
Learn about post-order traversal in a binary search tree and implement it in C#.
We'll cover the following
Introduction
In post-order traversal, the elements are traversed in the “left-right-root” order. 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-subtree of the
currentNode
recursively by calling thepostOrderPrint()
function on it. -
Traverse the right-subtree of the
currentNode
recursively by calling thepostOrderPrint()
function on it. -
Visit the current node and print its value.
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.