Skip to content

Commit e2c7d40

Browse files
authored
Update README.md
1 parent ab2f304 commit e2c7d40

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

note/030/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,15 @@ An O(N) solution with detailed explanation
109109

110110

111111
```java
112-
public List<Integer> findSubstringByWindowSlide(String s, String[] words) {
112+
class Solution {
113+
public List<Integer> findSubstring(String s, String[] words) {
114+
//1. method Iterate
115+
// return findSubstringByIterate(s, words);
116+
//2. method O(n)
117+
return findSubstringByWindowSlide(s, words);
118+
}
119+
120+
public List<Integer> findSubstringByWindowSlide(String s, String[] words) {
113121
List<Integer> resultList = new ArrayList<Integer>();
114122
if (s == null || s.length() == 0 || words == null || words.length == 0) {
115123
return resultList;
@@ -159,6 +167,7 @@ public List<Integer> findSubstringByWindowSlide(String s, String[] words) {
159167

160168
return resultList;
161169
}
170+
}
162171

163172
```
164173

0 commit comments

Comments
 (0)