|All-time Popular Problems|
|Delete Middle of Linked List|
|Find all four sum numbers|
|Find first set bit|
|Element with left side smaller and right side greater|
|Smallest Positive missing number|
|Intersection Point in Y Shapped Linked Lists|
|Largest Number formed from an Array|
|Reverse an Array|
Given an array of 0's and 1's your task is to complete the function maxLen which returns size of the largest sub array with equal number of 0's and 1's .
The function maxLen takes 2 arguments .The first argument is the array A and second argument is the size 'N' of the array A .
The first line of the input is T denoting the number of test cases .
Then T test cases follow . Each test case contains two lines .
The first line of each test case is a number N denoting the size of the array and in the next line are N space separated values of A [ ].
For each test case output in a new line the max length of the subarray .
0<=A[ ] <=1
Input (To be used only for expected output) :
0 1 0 1
0 0 1 0 0
Note:The Input/Ouput format and Example given are used for system's internal purpose, and should be used by a user for Expected Output only. As it is a function problem, hence a user should not read any input from stdin/console. The task is to complete the function specified, and not to write the full code.