Skip to content

Commit 1af3b02

Browse files
author
Li Li
committed
add 459 to table
1 parent afb59b7 commit 1af3b02

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ ID | Difficulty | Tags | Solution
1616
242 | Easy | Hash Table (Dictionary) | [Valid Anagram](https://goo.gl/kAT9Pp)
1717
438 | Easy | Hash Table (Dictionary), Two pointer, Sub string, Sliding window | [Find All Anagrams in a String](https://goo.gl/R5LUzb)
1818
3 | Medium| Hash Table (Dictionary), Two pointer, Sub string, Sliding window |[Longest Substring Without Repeating Characters](https://goo.gl/vWLZn5)
19+
28 | Easy | Two pointer, String | [Implement strStr()](https://goo.gl/UhEzha)
20+
459 | Easy | String | [Repeated Substring Pattern](https://goo.gl/VZ9j7H)
1921

2022
<br />
2123
<br />
@@ -85,10 +87,17 @@ First use dict record the counts for each char in string1, then check for string
8587
Similar problems:
8688
*438.* Find All Anagrams in a String (using sliding window in substring)
8789

88-
#### *3.* Longest Substring Without Repeating Characters
90+
#### 3. Longest Substring Without Repeating Characters
8991

9092
This problem can be solved by using Dictionary, Two pointers.
9193
Error prone. Think more about different cases.
9294

9395
**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.
101+
102+
Similar Problem:
103+
*459.* Repeated Substring Pattern

0 commit comments

Comments
 (0)