Maximum length biotonic subarray - C++ launchpad

Not able to find problem in my code.
Gives correct output for the sample case.
Link - https://ide.codingblocks.com/s/151724

Hi vyom
Your program is failing when array size = 1.
You are initializing max (or max2) = 0. Initialize max (or max2) = 1.

Hope it helps
Give a like if you’re satisfied :slight_smile:

Thank you. Was able to pass the test case after this.