temp variables
if ( dp [ n - 1 ] [ m ] != - 1 ) : NEW_LINE m1 = dp [ n - 1 ] [ m ] NEW_LINE else : NEW_LINE m1 = minDis ( s1 , s2 , n - 1 , m , dp ) NEW_LINE if ( dp [ n ] [ m - 1 ] != - 1 ) : NEW_LINE m2 = dp [ n ] [ m - 1 ] NEW_LINE else : NEW_LINE m2 = minDis ( s1 , s2 , n , m - 1 , dp ) NEW_LINE if ( dp [ n - 1 ] [ m - 1 ] != - 1 ) : NEW_LINE m3 = dp [ n - 1 ] [ m - 1 ] NEW_LINE else : NEW_LINE m3 = minDis ( s1 , s2 , n - 1 , m - 1 , dp ) NEW_LINE dp [ n ] [ m ] = 1 + min ( m1 , min ( m2 , m3 ) ) NEW_LINE return dp [ n ] [ m ] NEW_LINE