Longest increasing subarray
Submissions: 1938   Accuracy:

37.88%

  Difficulty: Basic   Marks: 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

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Ashtputre
Author: saksham0751


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.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.