You are given an integer array nums.
A subarray is defined as balanced if the count of distinct even numbers in the subarray is equal to the count of distinct odd numbers in the subarray.
Return the maximum length of a balanced subarray in nums.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
A subarray is defined as balanced if the count of distinct even numbers in the subarray is equal to the count of distinct odd numbers in the subarray.
Return the maximum length of a balanced subarray in nums.
Constraints:
nums.length
nums[i]