You are given an integer array nums.
For each index i, its score is defined as the number of indices j such that j i and nums[i] and nums[j] have opposite parities (that is, one element is even and the other is odd).
Return an array answer of the same length as nums, where answer[i] is the score of index i.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
For each index i, its score is defined as the number of indices j such that j i and nums[i] and nums[j] have opposite parities (that is, one element is even and the other is odd).
Return an array answer of the same length as nums, where answer[i] is the score of index i.
Constraints:
nums.length
nums[i]