Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a program in c language You are given an array A of N integers: A 1 , A 2 , ..., A N .

write a program in c language You are given an array A of N integers: A1, A2, ..., AN. You need to find a longest contiguous subarray in the array such that each integer in this subarray is an even integer, and output its length.

A contiguous subarray is of the form Ai, Ai+1, ..., Aj, for some i and j.

Input

The first line of the input contains an integer T denoting the number of test cases. The description of each test case follows.

The first line of each test case contains a single integer N denoting the number of elements in the given array.

The second line contains N space-separated integers A1, A2, ..., AN denoting the array A.

Output

For each test case, output a single line containing the answer.

Constraints

1 T 10

1 N 105

0 A1, A2, ... , AN 105

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

How would you describe your typical day at work?

Answered: 1 week ago