Driver code
arr = [ [ 0 ] * 1000 ] * 1000 NEW_LINE for i in range ( 0 , 1000 ) : NEW_LINE INDENT for j in range ( 0 , 1000 ) : NEW_LINE INDENT arr [ i ] [ j ] = - 1 NEW_LINE DEDENT DEDENT X = " AGGTAB " NEW_LINE Y = " GXTXAYB " NEW_LINE m = len ( X ) NEW_LINE n = len ( Y ) NEW_LINE print ( " Length ▁ of ▁ LCS ▁ is ▁ " , lcs ( X , Y , m , n ) ) NEW_LINE