Skip to content

Commit 843c3f7

Browse files
Merge pull request #2564 from xingyiteng/leetcode101
Update 0101.对称二叉树.md 交换顺序
2 parents 3582a9f + 5073196 commit 843c3f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

problems/0101.对称二叉树.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ public:
224224
st.push(root->left);
225225
st.push(root->right);
226226
while (!st.empty()) {
227-
TreeNode* leftNode = st.top(); st.pop();
228227
TreeNode* rightNode = st.top(); st.pop();
228+
TreeNode* leftNode = st.top(); st.pop();
229229
if (!leftNode && !rightNode) {
230230
continue;
231231
}
@@ -950,3 +950,4 @@ public bool IsSymmetric(TreeNode root)
950950
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
951951
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
952952
</a>
953+

0 commit comments

Comments
 (0)