C++ Brute Force
\nclass Solution {\npublic:\n    int helper(string s, string t,int len)\n    {\n        int count=0;\n        for(int i=0;i<=t.size()-len;i++)\n        {\n     
```\nclass Solution {\npublic:\n    int helper(string s, string t,int len)\n    {\n        int count=0;\n        for(int i=0;i<=t.size()-len;i++)\n        {\n            int c=0;\n            string temp=t.substr(i,len);\n           // cout<<s<<"\\t"<<temp<<"\\n";\n            for(int i=0;i<len;i++)\n                if(s[i]!=temp[i])\n                    c++;\n            \n            if(c==1)\n                count++;\n        }\n        return count;\n    }\n    int countSubstrings(string s, string t) {\n        int count=0;\n        for(int i=0;i<s.size();i++)\n        {\n            for(int j=1;j<=s.size()-i;j++)\n            {\n                string subs=s.substr(i,j);\n                count += helper(subs,t,j);\n            }\n        }\n        return count;  \n    }\n};\n```
['C', 'C++']