Skip to content

Latest commit

 

History

History

1044.Longest Duplicate Substring

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

English Version

题目描述

给出一个字符串 S,考虑其所有重复子串S 的连续子串,出现两次或多次,可能会有重叠)。

返回任何具有最长可能长度的重复子串。(如果 S 不含重复子串,那么答案为 ""。)

 

示例 1:

输入:"banana"
输出:"ana"

示例 2:

输入:"abcd"
输出:""

 

提示:

  1. 2 <= S.length <= 10^5
  2. S 由小写英文字母组成。

解法

Python3

Java

...