C++|| Commented || Easy to Understand || Sliding Window|| Map
\nclass Solution {\npublic:\n    string minWindow(string s, string t)\n    {\n        unordered_map<char, int> mapt; // For frequency of characters of string t\
```\nclass Solution {\npublic:\n    string minWindow(string s, string t)\n    {\n        unordered_map<char, int> mapt; // For frequency of characters of string t\n        for(auto ch : t)\n        {\n            mapt[ch]++;\n        }\n        unordered_map<char, int> maps; // For frequency of characters of string s\n        int n = s.length();\n        string ans = "";\n        int k = 0;\n        int counter = 0;          // To count whether we have got all the characters of string t in string s\n        int i= -1;\n        int j = -1;\n        while(k<n)\n        {\n            \n            // Acquire\n            while(i < n-1 && counter != t.size())\n            {\n                i++;\n                maps[s[i]]++;\n                \n                if(maps[s[i]] <= mapt[s[i]])    // If the acquired character is matched, increased the count\n                {\n                    counter++;\n                }\n                \n            }\n            \n            //Store ans and Release\n            while(j < i && counter == t.size())\n            {\n                j++;\n                string pans = s.substr(j, i-j+1);     // Potential answer\n                \n                if(ans.size()== 0 || ans.size() > pans.size())\n                { \n                    ans = pans;        // If size of potential answer is less than answer, update the answer\n                }\n                \n                if(maps[s[j]] == 1)\n                {\n                    maps.erase(s[j]);\n                }\n                else maps[s[j]]--;\n                \n                if(maps[s[j]] < mapt[s[j]])     // If the released character is matched, decreased the count\n                {\n                    counter--;\n                }   \n            }\n            k++;\n        }\n        return ans;\n        \n        \n        \n    }\n};\n```
['C', 'Sliding Window']