from typing import List


def longest_substring_using_nested_for_loop(s: str) -> int:
    """
    Given a string s, find the length of the longest substring without repeating characters.

    https://leetcode.com/problems/longest-substring-without-repeating-characters/
    3946 ms	14.2 MB
    >>> longest_substring_using_nested_for_loop("abcabcbb")
    3
    >>> longest_substring_using_nested_for_loop("bbbbb")
    1
    >>> longest_substring_using_nested_for_loop("pwwkew")
    3
    """
    total = 0
    for idx, _ in enumerate(s):
        vals: List[str] = []
        for c2 in s[idx:]:
            if c2 not in vals:
                vals += [c2]
                total = max((total, len(vals)))
            else:
                total = max((total, len(vals)))
                break
    return total