We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e2506b commit 73b23e5Copy full SHA for 73b23e5
note/030/README.md
@@ -29,7 +29,15 @@ Output: []
29
30
## 思路
31
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来记录我们查到的单词。如果所有的单词都查到了,即可记录一个解。
41
42
```java
43
@@ -38,9 +46,9 @@ Output: []
46
47
## 结语
48
-如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-java-leetcode][ajl]
49
+如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-java-leetcode][zgpeace]
50
51
44
52
45
53
[title]: https://leetcode.com/problems/substring-with-concatenation-of-all-words
-[ajl]: https://github.com/Blankj/awesome-java-leetcode
54
+[zgpeace]: https://github.com/zgpeace/awesome-java-leetcode
0 commit comments