Longest increasing subarray
Basic Accuracy: 38.56% Submissions: 3371 Points: 1

Given an array containing n numbers. The problem is to find the length of the longest contiguous subarray such that every element in the subarray is strictly greater than its previous element in the same subarray. Time Complexity should be O(n).

Input:
The first line consists of an integer T i.e number of test cases. The first line of each test case consists of an integer n. The next line contains n spaced integers.

Output:
Print the required output.

Constraints: 
1<=T<=100
1<=n<=100
1<=a[i]<=104

Example:
Input:

2
9
5 6 3 5 7 8 9 1 2
10
12 13 1 5 4 7 8 10 10 11

Output:
5
4

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.