void dfs(TreeNode* pRoot,int& res,int&dep){ ++dep; if(pRoot->left==nullptr&&pRoot->right==nullptr){res=max(res,dep);--dep;return;} if(pRoot->left) dfs(pRoot->left,res,dep); if(pRoot->right)dfs(pRoot->right,res,dep); --dep; ...