Maximum length Bitonic Subarray

my code is running fine on test cases but it is showing the wrong answer when I am submitting the code.