Function to find the longest substring in string A which is a subsequence in B
int findLongestSubstring ( int posA , int posB , string & A , string & B , bool canSkip , int n , vector < vector < vector < int > > > & dp ) {