Count Subarrays With Majority Element I
Map each value to +1 when it equals the target and -1 otherwise, then count subarrays whose sum is positive.
Map each value to +1 when it equals the target and -1 otherwise, then count subarrays whose sum is positive.