Given an array A, find the maximum number of consecutive 1s in the array.
A: [1, 1, 3, 2, 3, 1, 1, 1]
Max consecutive 1s: 3
First line contains an integer âTâ denoting the number of test cases.
For each test case, the input has two lines:
For each test case, the output has a line with an integer denoting the maximum continuous 1s in the array A.
3
5
1 1 1 2 2
6
1 2 1 1 1 2
8
1 1 3 2 3 1 1 1
3
3
3
1 <= T <= 100
1 <= n <= 104
0 <= Ai <= 105