question samaj nhi aa rha
I did not get the question
@anujsharmabadboy Hey you need to find an sub arrays length that follows the patterns Ai<= Ai2<=Ai3…Aik>= Aik+1 >=Aik+2…
Simply subarray should be first non decreasing then it should be non increasing.
Eg
1 1 2 3 4 3 3 2 Len:8
10 15 20 Len: 3
13 11 10 9 Len: 4
All these are bitonic sub arrays . You need to find such subarrays and the maximum length of subarray is our answer.
bhai question toh samaj aa gya lekin logical path nhi mil rha
@anujsharmabadboy Create two array inc and dec, inc will store the count cotinuous increasing or equal length iterate it from 0 to n-1
Second array Dec will store the same value but this time we will start from n-1 and move to 0.
Finally the answer would be the max( inc[i]+dec[i]-1 )
If this resolves your doubt mark it as resolved.
@anujsharmabadboy hey first thing we need to use greater than equal to and less than equal to.
Second this might give tle.
Here is the implementation of the approach I told.
If this resolves your doubt mark it as resolved.