2206. Divide Array Into Equal Pairs

1 min read

class Solution:
def divideArray(self, nums: List[int]) -> bool:
c = Counter(nums)
for e in c:
if c[e] % 2 != 0:
return False
return True
0
Subscribe to my newsletter
Read articles from Tapan Rachchh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
