int maxDepth(struct Node* root){ if(!root) return 0; int max = 0; for(int i = 0; i < root->numChildren; ++i){ int temp = maxDepth(root->children[i]); max = max > temp ? max : temp; } return max + 1; }