wrong output is coming, what is the mistake ?
Maximum length Biotonic Subarray
Hello @vipin.kumar,
-
The way you are trying to initialize the arrays inc and dec with 1 is logically wrong.
-
The logic for computing the values of inc an dec is also wrong.
I have modified your code:
Hope, this would help.
Give a like if you are satisfied.
1 Like