Given an integer array A of size N containing 0's and 1's only.
You need to find the length of the longest subarray having count of 1’s one more than count of 0’s.
Note: In the subarray count of 1's should be one more than the count of 0's.
Input 1:
A = [0, 1, 1, 0, 0, 1]
Output 1:
5
Question Link:-https://www.interviewbit.com/problems/longest-subarray-length/