An Array is good if all the elements present in it have the same frequency. For ex, [2,3,3,2] is good because both 2 and 3 have frequency 2. [2,3,2] is not good because thew frequencies of 2 and 3 are 2 and 1 respec. Given an array A, count number of non - empty good subsequences of A.Since the answe is large, return it modulo 1000000007.
1<=|A|<=200000
1<=A[i]<=10^9