Driver program to test above function
int main ( ) { string X = " AGTGATG " ; string Y = " GTTAG " ; int m = X . length ( ) ; int n = Y . length ( ) ; cout << " LCS ▁ length ▁ is ▁ " << LCS ( X , Y , m , n ) << endl ; set < string > s = findLCS ( X , Y , m , n ) ; for ( string str : s ) cout << str << endl ; return 0 ; }