when i submit it wont pass any test cases, can you check and edit my code.
i exactly implemented from editorial.
My code only works for sample test case
@premang do not calculate max of inc[i] and dec[i] separately instead you should calculate ans as max(ans, inc[i]+dec[i]-1) in a single for loop.