If the length is 2
if ( ( r - l ) == 1 ) : NEW_LINE INDENT if ( s [ l ] == s [ r ] ) : NEW_LINE INDENT dp [ l ] [ r ] = 1 ; NEW_LINE DEDENT else : NEW_LINE INDENT dp [ l ] [ r ] = 0 ; NEW_LINE DEDENT return dp [ l ] [ r ] ; NEW_LINE DEDENT