comefrom: <doocs>0424.Longest Repeating Character Replacement_1.py
code: def characterReplacement( s: str, k: int) -> int:
      counter = [0] * 26
      i = j = maxCnt = 0
      while i < len(s):
          counter[ord(s[i]) - ord('A')] += 1
          maxCnt = max(maxCnt, counter[ord(s[i]) - ord('A')])
          if i - j + 1 > maxCnt + k:
              counter[ord(s[j]) - ord('A')] -= 1
              j += 1
          i += 1
      return i - j
masked: def sample_funcname ( var_0 : str , var_1 : int ) -> int :
      var_2 = [ 0 ] * 26
      var_5 = var_3 = var_4 = 0
      while var_5 < len ( var_0 ) :
          var_2 [ ord ( var_0 [ var_5 ] ) - ord ( 'A' ) ] += 1
          var_4 = max ( var_4 , var_2 [ ord ( var_0 [ var_5 ] ) - ord ( 'A' ) ] )
          if var_5 - var_3 + 1 > var_4 + var_1 :
              var_2 [ ord ( var_0 [ var_3 ] ) - ord ( 'A' ) ] -= 1
              var_3 += 1
          var_5 += 1
      return var_5 - var_3
  