comefrom: <doocs>0003.Longest Substring Without Repeating Characters_1.py
code: def lengthOfLongestSubstring( s: str) -> int:
      ss = set()
      i = ans = 0
      for j, c in enumerate(s):
          while c in ss:
              ss.remove(s[i])
              i += 1
          ss.add(c)
          ans = max(ans, j - i + 1)
      return ans
masked: def sample_funcname ( var_0 : str ) -> int :
      var_1 = set ( )
      var_3 = var_2 = 0
      for var_4 , var_5 in enumerate ( var_0 ) :
          while var_5 in var_1 :
              var_1.remove ( var_0 [ var_3 ] )
              var_3 += 1
          var_1.add ( var_5 )
          var_2 = max ( var_2 , var_4 - var_3 + 1 )
      return var_2
  