int treeHeight(node* root) {
if(root == NULL)
return 0;
else {
int leftHeight = treeHeight(root->left);
int rightHeight = treeHeight(root->right);
if(leftHeight >= rightHeight)
return leftHeight + 1;
else
return rightHeight + 1;
}
}