1. You are given an array that contains only 0s, 1s, and 2s. 2. You have to find length of the longest subarray with equal number of 0s, 1s, and 2s.
Input Format
A number N arr1 arr2.. N numbers
Output Format
A number representing length of the longest subarray with equal number of 0s, 1s, and 2s.
Constraints
1 <= N <= 10^5 0 <= arr[i] <= 2
Example
Input
7 0 1 0 2 0 1 0
Output
3