Given an integer array nums and an integer target, return the total number of contiguous subarrays in which target is the majority element.
Note: An element is considered the majority element of a subarray if it appears strictly more than half the total number of elements in that subarray.
Constraints:
nums.length
nums[i]
target
Given an integer array nums and an integer target, return the total number of contiguous subarrays in which target is the majority element.
Note: An element is considered the majority element of a subarray if it appears strictly more than half the total number of elements in that subarray.
Constraints:
nums.length
nums[i]
target