CPP program to count number of substrings of s1 present in s2 .
#include <iostream> NEW_LINE #include <string> NEW_LINE using namespace std ; int countSubstrs ( string s1 , string s2 ) { int ans = 0 ; for ( int i = 0 ; i < s1 . length ( ) ; i ++ ) {