Maximum length bitonic subarray

please explain how to implement this problem. and pseudo code is possible.

@ManyaGarg00
hello Manya,
we will maintain two additional array (inc and dec)

inc[i] = will store length of largest increasing subarray ending at index i

dec[i]=will store length of largest decresing subarray starting at index i

final answer will be maximum value of inc[i]+dec[i]-1

image

1 Like

it is still showing error

HI @ManyaGarg00 you had a missing paranthesis in line 24 i have changed that line here, https://ide.codingblocks.com/s/192174 i hope it works now.

error is in line no.26. please check on that too?

https://ide.codingblocks.com/s/192176 I have fixed all of your syntax errors now, please look into the logical errors now.