← Home
write a go solution for Description:
You are given a binary array a of n elements, a binary array is an array consisting only of 0s and 1s.

A blank space is a segment of consecutive elements consisting of only 0s.

Your task is to find the length of the longest blank space.

Input Format:
The first line contains a single integer t (1<=t<=1000) — the number of test cases.

The first line of each test case contains a single integer n (1<=n<=100) — the length of the array.

The second line of each test case contains n space-separated integers a_i (0<=a_i<=1) — the elements of the array.

Output Format:
For each test case, output a single integer — the length of the longest blank space.

Note:
None. Output only the code with no comments, explanation, or additional text.