We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
将test1改为 Test("Test1", pNode1, pNode1, pNode3, pNode1); 也就是
Test("Test1", pNode1, pNode1, pNode3, pNode1);
// 形状普通的树 // 1 // / \ // 2 3 // / \ // 4 5 // / \ / | \ // 6 7 8 9 10
1结点和3结点的最近公共祖先应该为1结点 得到 Failed.
Failed.
这是因为GetNodePath并没有把target结点也存入,导致target结点为root时返回空list,从而导致后续代码出错 解决办法是GetNodePath总是要把target结点也加入
GetNodePath
The text was updated successfully, but these errors were encountered:
No branches or pull requests
将test1改为
Test("Test1", pNode1, pNode1, pNode3, pNode1);
也就是
1结点和3结点的最近公共祖先应该为1结点
得到
Failed.
这是因为
GetNodePath
并没有把target结点也存入,导致target结点为root时返回空list,从而导致后续代码出错解决办法是
GetNodePath
总是要把target结点也加入The text was updated successfully, but these errors were encountered: