SOLVE

LATER

Pepper and Contiguous Even Subarray <Debugging>

/

This is a **DEBUGGING** question.

You have an array of length **N**. A subarray is called **Interesting** if it contains only even numbers. You have to find the maximum length of such **Interesting** subarray.

You are given a code which does the given task but has some bugs (errors). You have to make changes in the given function such that the code handles all the cases for errors and generate correct output every time.

**Input**

First line contains **T** , denoting number of test cases.

Each test case contains two lines:

- First line contains an integer **N** denoting the size of the array.

- Second line contains **N** space seperated integers denoting the value of array elements.

**Ouput**:

For each test case, print the maximum length of **Interesting** subarray. If no such subarray exist,print* -1*.

**Input Constraints**:

\(1 \le T \le 10\)

\(1 \le N \le 10^5\)

\(1 \le A[i] \le 10^6\)

**Note**:

**The input and output is handled by the code itself. You are just supposed to correct the function.**

Explanation

We can select 2nd and 3rd element as both are even numbers and form a subarray of length 2.

Time Limit:
1.0 sec(s)
for each input file.

Memory Limit:
256 MB

Source Limit:
1024 KB

Initializing Code Editor...