← 返回 cisco 的题目列表Odd Birthday Date Count
类型:qbank
Given birthday dates for a month, count how many distinct dates occur an odd number of times.
Requirements
Input line 1 is inputArr_size, the number of birthday celebrations.
Input line 2 contains N space-separated integers representing birthday dates.
Print the count of dates that occur an odd number of times.
Examples
Input:
5
4 8 2 8 9
Output:
3
Explanation: 4, 2, and 9 occur once; 8 occurs twice and does not count.
Notes
A frequency map or parity-toggling set is enough.