leetcode424】的更多相关文章

Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the length of a longest substring containing all repeating letters you can get after performing the abo…
public class Solution { public int CharacterReplacement(string s, int k) { int len = s.Length; ]; , maxCount = , maxLength = ; ; end < len; end++) { maxCount = Math.Max(maxCount, ++count[s[end] - 'A']); - maxCount > k) { count[s[start] - 'A']--; sta…
""" Given a string s that consists of only uppercase English letters, you can perform at most k operations on that string. In one operation, you can choose any character of the string and change it to any other uppercase English character.…