Skip to content

Commit 73b23e5

Browse files
authored
Update README.md
1 parent 3e2506b commit 73b23e5

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

note/030/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ Output: []
2929

3030
## 思路
3131

32-
题意是
32+
1. 使用HashMap来保存L中所有的字串。
33+
34+
2. 暴力破解之。使用i记录我们的查找结果字符串的位置,j记录单个单词的查找位置。j每次移动一个L中单词的位置。
35+
36+
3. 注意各种越界条件:i查到离结束还有L*N(L中所有单词总长)的时候,即需要停止。
37+
38+
j 也要考虑每一次查找的单词的长度。
39+
40+
4. 使用第二个HashMap来记录我们查到的单词。如果所有的单词都查到了,即可记录一个解。
3341

3442
```java
3543

@@ -38,9 +46,9 @@ Output: []
3846

3947
## 结语
4048

41-
如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-java-leetcode][ajl]
49+
如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-java-leetcode][zgpeace]
4250

4351

4452

4553
[title]: https://leetcode.com/problems/substring-with-concatenation-of-all-words
46-
[ajl]: https://github.com/Blankj/awesome-java-leetcode
54+
[zgpeace]: https://github.com/zgpeace/awesome-java-leetcode

0 commit comments

Comments
 (0)