Maximum bitonic length subarray

code–>

https://practice.geeksforgeeks.org/problems/maximum-length-bitonic-subarray5730/1
question–>

Not Passing All test cases

hey @sheikhhaji18

for(int i=1;i<n;i++){
	        if(a[i]>=a[i-1]){  //>= here
	            left[i]=left[i-1]+1;
	        }
	        else{
	            left[i]=1;
	        }
	    }
	    right[n-1]=1;
	    for(int i=n-2;i>=0;i--){
	        if(a[i]>=a[i+1]){  //>= here
	            right[i]=right[i+1]+1;
	        }
	        else{
	            right[i]=1;
	        }
	    }

If this resolves ur query then please mark it as resolved :slight_smile:

thx @Kartikkhariwal1

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.