Longest Substring Without Repeating Characters

Given a string s, find the length of the longest contiguous substring that contains no repeated characters.

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 50" width="280" height="45"> <text x="0" y="18" font-family="monospace" font-size="14" fill="#888">s = </text> <text x="28" y="18" font-family="monospace" font-size="14" fill="#d00">a b c</text> <text x="70" y="18" font-family="monospace" font-size="14" fill="#888">a b c b b</text> <text x="28" y="38" font-family="monospace" font-size="12" fill="#d00">no repeats</text> </svg>

A substring is a contiguous sequence of characters within s. The answer must be the length of the longest such substring where every character appears at most once.

Examples
Input: "abcabcbb"
Output: 3
Hints

Longest Substring Without Repeating Characters

Given a string `s`, find the length of the longest contiguous substring that contains no repeated characters.