C++ easy solution
**** upvote if it\'s helpful\n\nint countSubstrings(string s, string t)\n    {\n       int ans=0;\n   \n        int n=s.size(),m=t.size() ;\n      for(int I=0;I
**** upvote if it\'s helpful\n```\nint countSubstrings(string s, string t)\n    {\n       int ans=0;\n   \n        int n=s.size(),m=t.size() ;\n      for(int I=0;I<n;I++)\n      {\n          \n          for(int J=0;J<m;J++)\n          {\n              int i=I;\n              int j=J;\n              int diff=0;\n              while(i<n and j<m and diff<=1)\n              {\n                  if(s[i]!=t[j])\n                      diff++;\n                  if(diff==1)\n                      ans++;\n                  i++;\n                  j++;\n              }\n          }\n      }\n      \n     return ans;   \n    }\n```
['C']