input: Write a function to find the length of the longest substring without repeating characters.
  assert findLongestSubstring('abcaac') == 3
  assert findLongestSubstring('bbbb') == 1
  assert findLongestSubstring('pwwkew') == 3
  assert findLongestSubstring('abcabcbb') == 3
  assert findLongestSubstring('') == 0
output: def findLongestSubstring(s: str) -> int:
      char_map = {}
      left = 0
      max_length = 0
  
      for right, char in enumerate(s):
          if char in char_map and char_map[char] >= left:
              left = char_map[char] + 1
          char_map[char] = right
          max_length = max(max_length, right - left + 1)
      
      return max_length