#3737
Count Subarrays With Majority Element I
specialist · 645 · lc medium +30 · 65.3% accepted · 49 likes · top 70%
Description
Given an integer array nums and an integer target, return the number of subarrays in which target appears strictly more than half the time (i.e., target is the majority element).
Code
1
2
3