Function to find the longest substring in string A which is a subsequence in B
static int findLongestSubstring ( int posA , int posB , String A , String B , int canSkip , int n , int dp [ ] [ ] [ ] ) {