You are viewing a single comment's thread. Return to all comments →
C++11:
int height(Node* root) { if(root == nullptr) { return -1; } return max(height(root->left), height(root->right)) + 1; }
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Height of a Binary Tree
You are viewing a single comment's thread. Return to all comments →
C++11: