public void PostOrderTraversal() { if (root != null) { root.PostOrderTraversal(); } }
public void PostOrderTraversal() { if (root != null) { root.PostOrderTraversal(); } Console.WriteLine(); }
// left -> Right -> root nodes public void PostOrderTraversal() { // left child if (leftNode != null) { leftNode.PostOrderTraversal(); } // right child if (rightNode != null) { rightNode.PostOrderTraversal(); } // printing root node Console.Write(data + " "); }
public void PostOrderTraversal() { root?.PostOrderTraversal(); }