question: bitonic subarray
my code: https://ide.codingblocks.com/s/391565
what’s wrong in my code?
Bitonic subarray
Hey @samardeep for test case:
1
10
3 5 2 1 5 6 7 8 3 1
Expected output is: 7
Yours is giving : 6
Also the approach you are using is not ideal so i would suggest you to make two array seperate for increasing and decreasing sequence and then solve it just to avoid any error. i am attaching a code from which you can take reference and apply it in your code.