#C7804. Longest Substring Without Repeating Characters

    ID: 51716 Type: Default 1000ms 256MiB

Longest Substring Without Repeating Characters

Longest Substring Without Repeating Characters

Given a string s, your task is to find the length of the longest substring without any repeating characters. A substring is a contiguous sequence of characters within a string. This problem can be efficiently solved using the sliding window technique. Consider edge cases such as an empty string, a string with all identical characters, or a string where all characters are unique.

Note: If any mathematical formulas are used, they should be written in LaTeX format.

inputFormat

The input consists of a single line, which contains the string s. The string may contain letters, digits, symbols, and can be empty.

Input Format:

s

outputFormat

Output a single integer representing the length of the longest substring of s that does not contain any repeating characters.

Output Format:

result
## sample
abcabcbb
3