2206. Divide Array Into Equal Pairs

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 2206

class Solution:
    def divideArray(self, nums: List[int]) -> bool:
        cnt = Counter(nums)
        return all(v % 2 == 0 for v in cnt.values())