First, thanks the post from @vinceyuan

Here I just try explain it carefully so to help some beginners to better understand the inspiring ideas behind the solution.

Preprocessing step:

store the condition variable in the unordered_map

While loop step:

```
check sub-conditions, update global variable
for the satisfying condition, we can move the start pointer
forward to calculate all the possible solution.
```

I do think this solution is really not easy to us to implement all by our self.

The only way to better grasp this solution is to write it many times by yourself.

Here is the C++ implementation:

```
class Solution {
public:
string minWindow(string s, string t) {
vector<int> v(128, 0);
for(auto c:t) v[c]++;
int start=0, end=0, counter=t.size();
int minStart=0, minLen=INT_MAX;
int len=s.size();
while(end<len){
if(v[s[end]]>0) counter--;
v[s[end]]--;
end++;
while(counter==0){
if(end-start<minLen){
minStart=start;
minLen=end-start;
}
v[s[start]]++;
if(v[s[start]]>0) counter++;
start++;
}
}
if(minLen!=INT_MAX)
return s.substr(minStart, minLen);
return "";
}
};
```