You are viewing a single comment's thread. Return to all comments →
I think we don't need to count-- when we check in the right subtree of the root since count is already negative now, so we can skip this statement
if (root->right && count<0) { // count--; top_view(root->right); }
Seems like cookies are disabled on this browser, please enable them to open this website
Tree : Top View
You are viewing a single comment's thread. Return to all comments →
I think we don't need to count-- when we check in the right subtree of the root since count is already negative now, so we can skip this statement