Base case
if ( l > r ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT if ( r < l1 or l > r1 ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT if ( l1 <= l and r <= r1 ) : NEW_LINE INDENT return seg [ In ] NEW_LINE DEDENT