File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,15 @@ An O(N) solution with detailed explanation
109
109
110
110
111
111
``` 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 ) {
113
121
List<Integer > resultList = new ArrayList<Integer > ();
114
122
if (s == null || s. length() == 0 || words == null || words. length == 0 ) {
115
123
return resultList;
@@ -159,6 +167,7 @@ public List<Integer> findSubstringByWindowSlide(String s, String[] words) {
159
167
160
168
return resultList;
161
169
}
170
+ }
162
171
163
172
```
164
173
You can’t perform that action at this time.
0 commit comments