Open
Conversation
|
|
||
| 针对以上的三种类型,都给出了模版。可是就像weiwei大佬说的[link](https://ojeveryday.github.io/AlgoWiki/#/BinarySearch/01-introduction?id=%e4%ba%8c%e5%88%86%e6%9f%a5%e6%89%be%e7%9a%84%e4%b8%89%e4%b8%aa%e6%a8%a1%e6%9d%bf),仅供参考哈。模版的意义在于可以帮助减少对某些边界条件的考虑以及对于某些问题的多想,节约脑细胞。 | ||
|
|
||
| 一般来说我们都需要用到两个变量,分别表示两个idx,一般是数组或者字符串中的idx。 |
Contributor
There was a problem hiding this comment.
idx 这种缩写不知道是不是规范,可以说两个下标(索引),或者就说两个变量,问题都不大。
因为双指针就是在解决问题的过程中,使用的两个变量。
|
|
||
| NOTE: | ||
|
|
||
| 滑动窗口应该算是双指针的一种应用,同时还可以用queue来实现。 |
Contributor
There was a problem hiding this comment.
- 同上,「应该算」建议删去;
+「同时还可以用queue来实现。」建议删去。
TwoPointers/02-同向双指针.md
Outdated
Contributor
There was a problem hiding this comment.
前面快慢指针命名用 fast,这里命名也需要统一用成 fast。
TwoPointers/02-同向双指针.md
Outdated
Contributor
There was a problem hiding this comment.
print 这样的语句需要从示例代码中删除。
TwoPointers/03-相向双指针.md
Outdated
Contributor
There was a problem hiding this comment.
「指针对撞」的问题例题建议的顺序是:
- 第 167 题
- 第 11 题
- 第 15 题
- (前 3 题是典型问题)其它相关问题
并且建议尽量通俗地讲清楚,是怎么想到指针一头一尾相向,然后简单说明合理性。
TwoPointers/04-背向双指针.md
Outdated
Contributor
|
知识点和例题上面没有太多问题,反馈意见如下:
|
|
要在 sidebar 里面添加一下自己的 markdown 文件哈 |
Contributor
|
我以前为了看预览,自己加了上去,不知道是不是对原作者有用。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add two pointer