Maximum Length Biotonic Subsequence Coding Blocks IDE

help… for the given test case the answer is correct n for some of my examples too… but on the website in getting wrong answer