C++|| Sliding Window|| Using arrays
Runtime: 8 ms\n\n\nclass Solution {\npublic:\n    string minWindow(string s, string t) {\n        \n        //frequency mapping\n        int FP[256]={0};\n     
Runtime: 8 ms\n\n```\nclass Solution {\npublic:\n    string minWindow(string s, string t) {\n        \n        //frequency mapping\n        int FP[256]={0};\n        int FS[256]={0};\n        int cnt=0;\n        int start=0; //left contraction\n        int start_idx=-1 ;//for best window\n        int min_so_far=INT_MAX;\n        \n        for(int i=0;i<t.length();i++){\n            FP[t[i]]++;\n        }\n        \n        //sliding window algo\n        for(int i=0;i<s.length();i++){\n        //expand window by including current character\n        \n            char ch=s[i];\n            FS[ch]++;\n            //count how many characters have been matched till now\n            if(FP[ch]!=0 and FS[ch]<=FP[ch]){\n                cnt+=1;\n            }\n            //if all characters are found in current window then start contracting\n            \n            if(cnt==t.length()){\n                \n                //start contracting \n                while(FP[s[start]]==0 or FS[s[start]]>FP[s[start]]){\n                    FS[s[start]]--;\n                    start++;\n                }\n            \n                int window_size=i-start+1;\n                if(window_size<min_so_far){\n                    min_so_far=window_size;\n                    start_idx=start;\n                }\n            }\n        \n        }\n        if(start_idx==-1){\n            return "";\n        }\n        return s.substr(start_idx,min_so_far);\n    }\n};\n```
['C', 'Sliding Window']