Skip to content
C

Longest Substring Without Repeating Characters

Mediumjavapythonccppjavascript

Given a string, find the length of the longest substring that contains no repeated character.

Input Format

A single line containing the string S with no spaces.

Output Format

Print the length of the longest substring with all distinct characters.

Input (stdin)

Output

Run your code to see output here...