2404. Most Frequent Even Element
Easy
Given an integer array nums
, return the most frequent even element.
If there is a tie, return the smallest one. If there is no such element, return -1
.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= nums.length <= 2000
0 <= nums[i] <= 105
解題
Last updated