Calculate the maximum length of the strictly increasing subarray after removing the current element
for i in range ( 1 , n - 1 ) : NEW_LINE INDENT if ( a [ i - 1 ] < a [ i + 1 ] ) : NEW_LINE INDENT ans = max ( pre [ i - 1 ] + pos [ i + 1 ] , ans ) ; NEW_LINE DEDENT DEDENT return ans ; NEW_LINE