#C12203. Longest Substring Without Repeating Characters
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 repeating characters.
The problem requires that you determine the maximum length substring which contains no duplicate characters.
For example, for the input string abrkaabcdefghijjxxx
, the longest substring without repeating characters is abcdefghij
which has a length of 10.
The solution should read input from the standard input (stdin) and write the result to the standard output (stdout).
inputFormat
The input consists of a single line containing a string s
. The string may be empty.
Input Format:
s
outputFormat
Output a single integer, which is the length of the longest substring of s
without repeating characters.
Output Format:
result## sample
abrkaabcdefghijjxxx
10