Find the Longest Isolated Substring Length
The task is to determine the length of the longest isolated proper substring within a given string. An isolated proper substring must satisfy the following conditions:
- The substring is not the entire given string
inputString. - No character within the substring appears anywhere outside the substring.
Given a string inputString of length n, determine the length of its longest isolated proper substring. If no such substring exists, return 0.
Implement the function findLongestIsolatedSubstringLength in the editor.
The function takes the following parameter:
String inputString: the string to analyze
Returns
int: the length of the longest isolated proper substring
1Example 1

2Example 2

Constraints
Limits and guarantees your solution can rely on.
sconsists of lowercase letters.1 ≤ n ≤ 10^5