You are given numbers, . Output all the modes of this list on a single line from least to greatest. The mode of a list is/are the value(s) that appear(s) the most times relative to the other values in the list. It is guaranteed that at least one mode exists.
Constraints
In all tests,
Input Specification
The first line contains one number, .
The second line contains spaced integers, , the numbers in this list.
Output Specification
On one line, output the modes of the numbers in increasing order.
Sample Input
10
9 2 9 6 8 7 1 3 9 6
Sample Output
9
Comments
Why is my code timing out?
Can someone check my submission? https://dmoj.ca/src/2135529 I've tried dozens of test cases and they all seem to work fine but I'm still getting WA.
You fail this case:
Thanks, fixed. The issue was that the numbers were being sorted alphabetically instead of numerically...