You are viewing a single comment's thread. Return to all comments →
I'm getting confused about what people exactly mean. It would either be
if (root != null) { Postorder(root.left); Postorder(root.right); System.out.print(root.data+" "); }
or
if (root == null) return; Postorder(root.left); Postorder(root.right); System.out.print(root.data+" ");
I agree that you don't need both of the options, but one is necessary.
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Postorder Traversal
You are viewing a single comment's thread. Return to all comments →
I'm getting confused about what people exactly mean. It would either be
or
I agree that you don't need both of the options, but one is necessary.