What corner cases am I missing?

To find the lbs, I have maintained two arrays, l[n] and r[n].

l[i] -> represents the length of the longest increasing subarray(from the left side) including the ith element.

r[i] -> represents the length of the longest increasing subarray(from the right side) including the ith element.

and finally, I am finding the max l[i] + r[i] - 1.

I tried the sample cases given and also with monotonic sequences. I am getting correct answer for those.

what corner cases I am still missing?

@Avi-Kasliwal-315786729062203

hello avi,
your apporoach is correct.
what issue u r facing?

I am getting wrong ans for 3/4 cases.

@Avi-Kasliwal-315786729062203
pls save ur code on -> https://ide.codingblocks.com/
and share the link

Solved. Was not taking care of cases like
6
1 1 1 2 2 2

correct output for this is 6.