input: Write a python function to find the longest substring without repeating characters.
  assert longestSubstringWithoutRepeatingCharacters("abcabcbb") == "abc"
  assert longestSubstringWithoutRepeatingCharacters("bbbbb") == "b"
  assert longestSubstringWithoutRepeatingCharacters("pwwkew") == "wke"
output: def longestSubstringWithoutRepeatingCharacters(s):
      n = len(s)
      if n == 0:
          return ""
      
      char_map = {}
      left = 0
      max_len = 0
      max_substr = ""
      
      for right in range(n):
          if s[right] in char_map:
              left = max(left, char_map[s[right]] + 1)
          
          char_map[s[right]] = right
          if right - left + 1 > max_len:
              max_len = right - left + 1
              max_substr = s[left:right+1]
      
      return max_substr