File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/main/java/com/stevesun/solutions Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ Your ideas/fixes/algorithms are more than welcome!
84
84
| 463| [ Island Perimeter] ( https://leetcode.com/problems/island-perimeter/ ) | [ Solution] ( ../master/src/main/java/com/stevesun/solutions/IslandPerimeter.java ) | O(m* n)| O(1) | Easy|
85
85
| 462| [ Minimum Moves to Equal Array Elements II] ( https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/ ) | [ Solution] ( ../master/src/main/java/com/stevesun/solutions/MinimumMovestoEqualArrayElementsII.java ) | O(nlogn) | O(1) | Medium|
86
86
| 461| [ Hamming Distance] ( https://leetcode.com/problems/hamming-distance/ ) | [ Solution] ( ../master/src/main/java/com/stevesun/solutions/HammingDistance.java ) | O(n) | O(1) | Easy|
87
- |459|[ Repeated Substring Pattern] ( https://leetcode.com/problems/repeated-substring-pattern/ ) |[ Solution] ( ../master/src/main/java/com/stevesun/solutions/RepeatedSubstringPattern .java ) | O(n)|O(n) | Easy| KMP
87
+ |459|[ Repeated Substring Pattern] ( https://leetcode.com/problems/repeated-substring-pattern/ ) |[ Solution] ( ../master/src/main/java/com/stevesun/solutions/_459 .java ) | O(n)|O(n) | Easy| KMP
88
88
|458|[ Poor Pigs] ( https://leetcode.com/problems/poor-pigs/ ) |[ Solution] ( ../master/src/main/java/com/stevesun/solutions/PoorPigs.java ) | O(1) |O(1) | Easy| Math
89
89
|456|[ 132 Pattern] ( https://leetcode.com/problems/132-pattern/ ) |[ Solution] ( ../master/src/main/java/com/stevesun/solutions/_456.java ) | O(n) |O(n) | Medium| Stack
90
90
| 455| [ Assign Cookies] ( https://leetcode.com/problems/assign-cookies/ ) | [ Solution] ( ../master/src/main/java/com/stevesun/solutions/AssignCookies.java ) | O(n)| O(1) | Easy|
Original file line number Diff line number Diff line change 18
18
Output: True
19
19
20
20
Explanation: It's the substring "abc" four times. (And the substring "abcabc" twice.)*/
21
- public class RepeatedSubstringPattern {
22
- /**Looked at this post : https://discuss.leetcode.com/topic/68089/repeated-substring-pattern-simple-java-solution-using-kmp*/
21
+ public class _459 {
22
+ /**credit : https://discuss.leetcode.com/topic/68089/repeated-substring-pattern-simple-java-solution-using-kmp*/
23
23
public static boolean repeatedSubstringPattern (String str ) {
24
24
//build the KMP pattern.
25
25
int n = str .length (), cur = 0 , j = 1 ;
You can’t perform that action at this time.
0 commit comments