框架123456789101112int left = 0;int right = 0;while(right < s.size()){ //扩大窗口 window.add(s[right]); right++; while(windos need shrink){ window.remove(s[left]); left++;}}