why this code is getting wrong answer on hacker blocks although it is working fine on my compiler
Maximum bitonic subarray length
Hi @mohitshendre2609
ur code is failing sample test cases too.
2
8
1 11 2 10 4 5 2 1
6
80 60 30 40 20 10
ans should be 6 and 5 but ur code outputs 4 and 4.
use longest increasing subsequence approach to find inc and dec subsequences.
right now u r trying to find longest inc dec subarray.
Hope dis helps