Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[pull] master from youngyangyang04:master #265

New issue

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

Merged
pull merged 6 commits into AlgorithmAndLeetCode:master from youngyangyang04:master
May 15, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions problems/0101.对称二叉树.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ else if (left->val != right->val) return false; // 注意这里我没有


* 比较二叉树外侧是否对称:传入的是左节点的左孩子,右节点的右孩子。
* 比较内测是否对称,传入左节点的右孩子,右节点的左孩子。
* 比较内侧是否对称,传入左节点的右孩子,右节点的左孩子。
* 如果左右都对称就返回true ,有一侧不对称就返回false 。

代码如下:
Expand Down Expand Up @@ -157,7 +157,7 @@ public:

**这个代码就很简洁了,但隐藏了很多逻辑,条理不清晰,而且递归三部曲,在这里完全体现不出来。**

**所以建议大家做题的时候,一定要想清楚逻辑,每一步做什么。把道题目所有情况想到位,相应的代码写出来之后,再去追求简洁代码的效果。**
**所以建议大家做题的时候,一定要想清楚逻辑,每一步做什么。把题目所有情况想到位,相应的代码写出来之后,再去追求简洁代码的效果。**

## 迭代法

Expand Down

AltStyle によって変換されたページ (->オリジナル) /