Base case , if we put the last character at back of A
if ( s [ n - 1 ] == t [ n - 1 ] ) : NEW_LINE INDENT dp [ n - 1 ] [ 0 ] = 1 NEW_LINE DEDENT for i in range ( n - 1 , - 1 , - 1 ) : NEW_LINE INDENT for j in range ( n - i + 1 ) : NEW_LINE DEDENT