Skip to content

Commit 9b42b9e

Browse files
refactor 1062
1 parent 1951f4e commit 9b42b9e

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/main/java/com/fishercoder/solutions/_1062.java

-29
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 1062. Longest Repeating Substring
5-
*
6-
* Given a string S, find out the length of the longest repeating substring(s). Return 0 if no repeating substring exists.
7-
*
8-
* Example 1:
9-
* Input: "abcd"
10-
* Output: 0
11-
* Explanation: There is no repeating substring.
12-
*
13-
* Example 2:
14-
* Input: "abbaba"
15-
* Output: 2
16-
* Explanation: The longest repeating substrings are "ab" and "ba", each of which occurs twice.
17-
*
18-
* Example 3:
19-
* Input: "aabcaabdaab"
20-
* Output: 3
21-
* Explanation: The longest repeating substring is "aab", which occurs 3 times.
22-
*
23-
* Example 4:
24-
* Input: "aaaaa"
25-
* Output: 4
26-
* Explanation: The longest repeating substring is "aaaa", which occurs twice.
27-
*
28-
* Note:
29-
* The string S consists of only lowercase English letters from 'a' - 'z'.
30-
* 1 <= S.length <= 1500
31-
* */
323
public class _1062 {
334
public static class Solution1 {
345
public int longestRepeatingSubstring(String S) {

0 commit comments

Comments
 (0)