Max length bitonic subarray

i understood the code but i am not able to understand how byadding max from both increasing and decreasing array and then subtracting it by 1 is giving us max length bitonic subarray

hello @jatinupadhyay786
we will not do this only for any particular index ,but actually we will do it for all indices i.e
we will iterate from i=0 to i=n-1 and we will consider current index value as peak value .
and find answer and update our max.
this iteration will enusre that answer we will get is maximum.

but how is this aglo working

i mean how by adding inc and dec array we are getting max bitonic subarray

ok leave this,
tell me ur approach how u will compute answer for any particular index

not able to figure it out so i saw it on geek for geeks

bitonic sequence contain increasing subarry then peak and then decreasing subarray right ? (this is clearly given in question)