#C226. Longest Substring Without Repeating Characters

    ID: 45556 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 that does not contain any repeating characters.

This is a classic sliding window problem. You need to determine the maximum length of a contiguous substring in which every character appears at most once.

Note: The input string may contain spaces, symbols, or be empty.

inputFormat

The input consists of a single line containing the string s. The string may include letters, digits, symbols and spaces. It can also be empty.

outputFormat

Output a single integer representing the length of the longest substring of s that contains no repeated characters.

## sample
abcabcbb
3