int counter = 0 ; pointing s2
#include <bits/stdc++.h> NEW_LINE using namespace std ; int Substr ( string s2 , string s1 ) { int i = 0 ; for ( ; i < s1 . length ( ) ; i ++ ) { if ( counter == s2 . length ( ) ) break ; if ( s2 [ counter ] == s1 [ i ] ) { counter ++ ; } else {