Code is not passing the test cases

code is working fine but not passing any testcase. Please have a look at the code https://ide.codingblocks.com/s/202282

@kt62495 your code is not working fine as you can see it is giving incorrect answer for the first sample test case

Where is the problem in the code?

As my code is giving correct answer for the sample input

@kt62495
image

this part is not correct.

for each i
u need to compute longest increasing length starting from left of i and ending at i (say a)
then u need to compute longest decresing length starting from i and ending to thr right of i(say b)

then answer will be the maximum value of a+b-1 .