calculate the height of a binary tree

https:‮//‬www.lautturi.com
calculate the height of a binary tree
int height(Node* root)
{
    if (root == nullptr)
        return 0;
		
    return 1 + max(height(root->left), height(root->right));
}
Created Time:2017-09-08 15:28:13  Author:lautturi