Driver Code
public static void main ( String [ ] args ) { String X = " AGTGATG " ; String Y = " GTTAG " ; int m = X . length ( ) ; int n = Y . length ( ) ; System . out . println ( " LCS ▁ length ▁ is ▁ " + LCS ( X , Y , m , n ) ) ; Set < String > s = findLCS ( X , Y , m , n ) ; for ( String str : s ) System . out . println ( str ) ; } }