Given an array of positive integers. The task is to print the maximum length of Bitonic subsequence.
a subsequenceof array is called Bitonic if it is first increasing, then decreasing.
First line contains T test cases. First line of every test case consists of N , denoting number of elements in an array. Second line of every test consists of elements in array.
For each testcase, in a new line, print the length of longest bitonic sequence.
1 2 5 3 2
1 11 2 10 4 5 2 1
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.