@chsekhar No, it's used to update the number of char r to be found in the map, so that the left edge of window could move to right with subtacting the count or not.

For example, for the s-string "aabcd" and the t-string "abc". The map is [[a,1], [b,1], [c,1]] at first;

After visiting the first 'a', it becomes [[a,0], [b,1], [c,1]];

Then the second 'a', [[a,-1], [b,1], [c,1]];

When you reach the 'c', you get a map [[a,-1], [b,0], [c,0]] with count == 3. Then you update minLeft & minLen. Now it's important:

You should add 1 to the value in the map according to the left char('a'), so the map is now [[a,0], [b,0], [c,0]];

Since the value according to the left char 'a' is still not greater than 0(no need to find another 'a'), so you move the left edge of the window moves 1 unit right without subtracting count;

The count is still 3 so you go through the loop again, this time the map will be [[a,1], [b,0], [c,0]], so the left edge of the window 1 unit with subtracting count.