框架

1
2
3
4
5
6
7
8
9
10
11
12
int left = 0;
int right = 0;

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