Given an array A[0 … n-1] containing n positive integers, a subarray A[i … j] is bitonic if there is a k with i <= k <= j such that A[i] <= A[i + 1] … = A[k + 1] >= .. A[j – 1] > = A[j]. Write a code to find the maximum of length bitonic subarray.
Input format :-
The first line contains t number of test cases.
For each test case there is two lines of input, first line consisting of the integer N. Second line consisting N separate space positive integers.
1 <= t <= 100
1 <= N <= 10^5
1 <= a[i] <= 10^6
Output format :-
Final output is t lines containing the maximum length of bitonic sub array for each input test case.