Driver program to test the above function
int main ( ) { char S [ ] = " babab " ; char T [ ] = " babba " ; int m = strlen ( S ) , n = strlen ( T ) ; int ans = shortestSeq ( S , T , m , n ) ; if ( ans >= MAX ) ans = -1 ; cout << " Length ▁ of ▁ shortest ▁ subsequence ▁ is : ▁ " << ans << endl ; return 0 ; }