Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b42b9e

Browse files
refactor 1062
1 parent1951f4e commit9b42b9e

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

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

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,5 @@
11
packagecom.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
publicclass_1062 {
334
publicstaticclassSolution1 {
345
publicintlongestRepeatingSubstring(StringS) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp