Even Frequency
Given a list of integers nums
, return whether all numbers appear an even number of times.
This should be done in \(\mathcal{O}(1)\) space.
Constraints
n ≤ 100,000
wheren
is the length ofnums
https://binarysearch.com/problems/Even-Frequency
Examples
Example 1
Input
- nums =
[2, 4, 4, 2, 3, 3]
Output
- answer =
True
Explanation
Every number occurs twice.
Example 2
Input
- nums =
[1]
Output
- answer =
False
Explanation
1
occurs an odd number of times.
Leave a comment