滑动窗口
public static int characterReplacement(String s, int k) {
if (s==null||s.length()==0) return 0;
char[] sArr=s.toCharArray();
int[] hash=new int[128];
int l=0,max=1;
int results=1;
for (int r=0;r<sArr.length;r++){
hash[sArr[r]]++;
max=Math.max(max,hash[sArr[r]]);
while (r-l+1-max>k){
hash[sArr[l]]--;
l++;
}
results=Math.max(results,r-l+1);
}return results;
}