Problem Description
Given a string A, find the length of the longest substring without repeating characters.
Note: Users are expected to solve in O(N) time complexity.
1 <= size(A) <= 106
String consists of lowerCase,upperCase characters and digits are also present in the string A.
Single Argument representing string A.
Return an integer denoting the maximum possible length of substring without repeating characters.
Input 1:
A = "abcabcbb"
Input 2:
A = "AaaA"
Output 1:
3
Output 2:
2
Explanation 1:
Substring "abc" is the longest substring without repeating characters in string A.
Explanation 2:
Substring "Aa" or "aA" is the longest substring without repeating characters in string A.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.