Set 102Question 62

Nabila's Mode Finder

MediumWritten in CMust finish in 2 seconds

Nabila needs the most frequently occurring value in a batch of readings from a hackathon.

What your program reads

Line1: N. Line2: N integers.

What your program prints

The most frequent value (smallest if tie).

Limits

1 ≤ N ≤ 10^5

Example input

6
4 4 2 2 4 1

Expected output

4
main.c

Your work is saved in this browser as you type.

Loading editor…
Input for Run

Run tries your code on the input above and shows what it prints. Submit checks your output against every test, including hidden ones.

Shortcut: Ctrl + Enter sends it to the judge.

Nabila's Mode Finder · DIU ContestHub