int Depth(Node *pRoot) { if (!pRoot) return 0; int leftDepth = Depth(pRoot->pLeft); int rightDepth = Depth(pRoot->pRight); return (leftDepth > rightDepth) ? (leftDepth + 1) : (rightDepth + 1); }
EOF
int Depth(Node *pRoot) { if (!pRoot) return 0; int leftDepth = Depth(pRoot->pLeft); int rightDepth = Depth(pRoot->pRight); return (leftDepth > rightDepth) ? (leftDepth + 1) : (rightDepth + 1); }
EOF