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?