← 返回 amazon 的题目列表Longest Self-Sufficient Proper Substring
类型:online_judge
amazon
In natural language processing preprocessing, you need to handle strings to find the length of the longest self-sufficient proper substring. The substring cannot be the whole string itself. Characters in the substring cannot appear outside the substring. Given a string fullString consisting of lowercase letters with length n, return the length of the longest substring meeting the above conditions. If no such substring exists, return 0.
Input:
fullString = "abcabcbb"
Output:
0
Constraints:
1 <= fullString.length <= 10^5
Example
Input
abcabcbb