感觉非常难大概 mid hard hard AC 2道第三题没思路但是dp味儿好浓 // 只含 0,1的串,每次只能将相邻的2个字符同时改成0或1 // 最少问多少次,可以让串的所有字符相等 // s.length <= 1e3 public int minOperations(String s) { // write code here return Math.min(cnt(s, 0), cnt(s, 1)); } // 将s全部改成x, 最少的操作次数 public int cnt(String s, int x) { i...