mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-11 04:54:51 +08:00
调换leftNode、rightNode
This commit is contained in:
@ -224,8 +224,8 @@ public:
|
||||
st.push(root->left);
|
||||
st.push(root->right);
|
||||
while (!st.empty()) {
|
||||
TreeNode* leftNode = st.top(); st.pop();
|
||||
TreeNode* rightNode = st.top(); st.pop();
|
||||
TreeNode* leftNode = st.top(); st.pop();
|
||||
if (!leftNode && !rightNode) {
|
||||
continue;
|
||||
}
|
||||
@ -950,3 +950,4 @@ public bool IsSymmetric(TreeNode root)
|
||||
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
|
||||
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
|
||||
</a>
|
||||
|
||||
|
Reference in New Issue
Block a user