Search⌘ K

Post-Order Traversal in Binary Search Tree

Explore the post-order traversal technique in binary search trees by learning its left-right-root visiting order. Understand how to implement this traversal recursively in Java, observe the output, and grasp the time complexity involved when visiting each node exactly once.

Post-order Traversal

In this type, the elements are traversed in a “left-right-root” order: We first visit the left child node, then the right child, and then comes the turn of root/parent node.

Follow the steps below to perform Post-Order Traversal, starting from the root node:

  • Traverse the left sub-tree of currentNode, recursively using PostOrder() function.

  • Traverse the right sub-tree of currentNode, recursively using PostOrder() function.

  • Visit current node and print its value. ...