#K45247. Longest Substring Without Repeating Characters

    ID: 27711 Type: Default 1000ms 256MiB

Longest Substring Without Repeating Characters

Longest Substring Without Repeating Characters

Given a string s consisting of lowercase English letters, find the length of the longest substring without any repeating characters. This problem can be approached using a sliding window technique, where the current window size is given by \( end - start + 1 \). Adjust the window dynamically to ensure all characters are unique.

inputFormat

A single line containing a string s of lowercase English letters.

outputFormat

Print a single integer denoting the length of the longest substring in s which does not contain any repeating characters.## sample

abcabcbb
3