We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
To be honest you don't need the second if statement if(root!= null) . The base case is can be seen as a else construct. I don't program in java but in C++ it looks like this
Tree: Postorder Traversal
You are viewing a single comment's thread. Return to all comments →
To be honest you don't need the second if statement
if(root!= null)
. The base case is can be seen as aelse
construct. I don't program in java but in C++ it looks like thisI guess in java, it would be