#C13700. Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters
You are given a string s. Your task is to compute the length of the longest substring of s that does not contain any repeating characters.
More formally, if we denote the length of the longest substring as L, then you must compute:
\( L = \max_{0 \le i \le j < n} \{ j - i + 1 \mid s[i\ldots j] \text{ has all unique characters} \}\)
The input string may consist of alphabets, digits, and special characters. Solve the problem using an efficient algorithm (ideally in O(n) time complexity) by applying a sliding window technique.
inputFormat
The input is provided via standard input (stdin) and consists of a single line containing the string s.
outputFormat
Output an integer to standard output (stdout), representing the length of the longest substring of s that contains no repeated characters.
## sampleabcabcbb
3