initialize the array with - 1
dp = [ [ - 1 for _ in range ( len ( s1 ) + 1 ) ] for _ in range ( len ( s2 ) + 1 ) ] NEW_LINE print ( " MINIMUM ▁ NUMBER ▁ OF ▁ DELETIONS : ▁ " , len ( s1 ) - transformation ( s1 , s2 , 0 , 0 , dp ) , end = " ▁ " ) NEW_LINE print ( " MINIMUM ▁ NUMBER ▁ OF ▁ INSERTIONS : ▁ " , len ( s2 ) - transformation ( s1 , s2 , 0 , 0 , dp ) , end = " ▁ " ) NEW_LINE print ( " LCS ▁ LENGTH : ▁ " , transformation ( s1 , s2 , 0 , 0 , dp ) ) NEW_LINE