You are provided n numbers of array. You need to find the maximum length of bitonic subarray. A subarray A[i β¦ j] is bitonic if there is a k with i <= k <= j such that A[i] <= A[i + 1] β¦ <= A[k] >= A[k + 1] >= β¦ A[j β 1] > = A[j] i.e subarray is first increasing and then decreasing or entirely increasing or decreasing.
A subarray A[i β¦ j] is bitonic if there is a k with i <= k <= j such that A[i] <= A[i + 1] β¦ <= A[k] >= A[k + 1] >= .. A[j β 1] > = A[j] i.e subarray is first increasing and then decreasing or entirely increasing or decreasing
hi @rachitpd1999_12754ab8dd26f52e
first of all give a new line after every test caseβ¦
secondly make array of size n instead of fixing it to of size nβ¦
corrected code -->
Itβs working fine and passing all test cases nowβ¦
its not passing any test case
yes,its working now thanks
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.