#C675. Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters
In this problem, you are given a string ( s ). Your task is to find the length of the longest substring in ( s ) that does not contain any repeated characters.
For example, for the input string "abcabcbb", the longest substring without repeating characters is "abc", which has a length of 3.
The problem requires careful handling of indices and characters, and can be efficiently solved using a sliding window technique.
inputFormat
The input consists of a single line containing the string ( s ). This string may include letters, digits, and special characters. The input is read from standard input (stdin).
outputFormat
Output a single integer representing the length of the longest substring without repeating characters. The result should be printed to standard output (stdout).## sample
pwwkew
3