You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -85,10 +87,17 @@ First use dict record the counts for each char in string1, then check for string
85
87
Similar problems:
86
88
*438.* Find All Anagrams in a String (using sliding window in substring)
87
89
88
-
#### *3.* Longest Substring Without Repeating Characters
90
+
#### 3. Longest Substring Without Repeating Characters
89
91
90
92
This problem can be solved by using Dictionary, Two pointers.
91
93
Error prone. Think more about different cases.
92
94
93
95
**Algorithm**
94
-
Use dict save record for char. Use two pointers as a sliding window for substring problem. If the char at right pointer exists in the dict, just move the left pointer to skip the same previous char (be careful to compare if left pointer is already larger than the previous char index).
96
+
Use dict save record for char. Use two pointers as a sliding window for substring problem. If the char at right pointer exists in the dict, just move the left pointer to skip the same previous char (be careful to compare if left pointer is already larger than the previous char index).
97
+
98
+
#### 28. Implement strStr()
99
+
100
+
This problem can be solve either by brute force or using hash method or KMP.
0 commit comments