Given a string input_str, return the length of the longest contiguous substring that contains no repeated characters.
Example 1
Input: "xyzxyzz"
Output: 3
Explanation: The longest substring without repeating characters is xyz.
Example 2
Input: "aaaaa"
Output: 1
Explanation: The longest substring without repeating characters is a.
Example 3
Input: "abcbde"
Output: 4
Explanation: The longest substring without repeating characters is cbde.
Constraints
Case 1
Input: "123123456"
Expected: 6
Case 2
Input: "abcdefgabcdefg"
Expected: 7
Case 3
Input: ""
Expected: 0
Case 4
Input: "a b c d e f"
Expected: 7
Case 5
Input: "xyxxyx"
Expected: 2