#C12389. Longest Unique Substring
Longest Unique Substring
Longest Unique Substring
Given a string s, your task is to find the longest substring that contains no repeating characters. This problem can be solved efficiently using the sliding window technique with linear time complexity.
The algorithm works by maintaining a dynamic window of characters that have not been repeated. When a repeated character is encountered, the window is adjusted to start after the previous occurrence of that character. The challenge is to keep track of the current window and update the longest unique substring found.
Note: If there are multiple substrings of the same maximum length, output the one that appears first.
inputFormat
The input consists of a single line containing a string s which may include lower-case or upper-case letters, digits, or other symbols.
The input is read from standard input (stdin).
outputFormat
Output the longest substring of s that does not contain any repeating characters. The result should be printed to standard output (stdout).
## sampleabcabcbb
abc
</p>