Skip to content
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

fix: 例子说明修正 #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion docs/docs/dataStructure/二叉树/对称的二叉树.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
如图,1为对称二叉树,2、3都不是。

- 两个根结点相等
- 左子树的左节点和右子树的右节点相同。
- 左子树的右节点和右子树的左节点相同。
- 右子树的左节点和左子树的右节点相同。

递归所有节点满足以上条件即二叉树对称。

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/dataStructure/数组/和为S的两个数字.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

## 思路

> 数组中可能有多对符合条件的结果,而且要求输出乘积最小的,说明要分布在两侧 比如 `3,8 ` `5,7` 要取`3,8`。
> 数组中可能有多对符合条件的结果,而且要求输出乘积最小的,说明要分布在两侧 比如 `3,9 ` `5,7` 要取`3,9`。

看了题目了,很像`leetcode`的第一题【两数之和】,但是题目中有一个明显不同的条件就是数组是有序的,可以使用使用大小指针求解,不断逼近结果,最后取得最终值。

Expand All @@ -22,7 +22,7 @@
- 小于`sum`,`left`向右移动
- 若`left=right`,没有符合条件的结果

> 类似【两数之和】的解法来求解,使用`map`存储另已经遍历过的`key`,这种解法在有多个结果的情况下是有问题的,因为这样优先取得的结果是乘积较大的。例如 `3,8 ` `5,7` ,会优先取到`5,7`。
> 类似【两数之和】的解法来求解,使用`map`存储另已经遍历过的`key`,这种解法在有多个结果的情况下是有问题的,因为这样优先取得的结果是乘积较大的。例如 `3,9 ` `5,7` ,会优先取到`5,7`。


## 代码
Expand Down