Max biotonic subarray length

cant understand the logic behind it

Hello @Sajid07,

Approach:

  1. Take a variable say nw to keep track of multiple biotonic sub arrays in the given array.
  2. Compare the current element with previous element.
  3. A biotonic sequence breaks if only if there is a increase after decrease.

You can refer to the following code for better understanding:

Hope, this would help.
Give a like, if you are satisfied.