How do you find the height of a multi-way tree? If I wanted to find the height of a binary tree, I could do something like this:
int height(node *root) {
if (root == NULL)
return 0;
else
return max(height(root->left), height(root->right)) + 1;
}
But I am not sure if I can apply a similar recursive method to a multiway tree.