traversing for every length of Y .
for ( int i = 0 ; i <= m ; i ++ ) { int temp_ans = maxSubsequenceSubstring ( X , Y , n , i ) ; if ( temp_ans > maximum_length ) maximum_length = temp_ans ; } cout << " Length ▁ for ▁ maximum ▁ possible ▁ Subsequence ▁ of ▁ string ▁ X ▁ which ▁ is ▁ Substring ▁ of ▁ Y ▁ - > ▁ " << maximum_length ; return 0 ; }