← All problemsSign in

Laptop Recommendation

CodeChefRating 1104Open on judge ↗

Chef wants to buy a new laptop. However, he is confused about which laptop to buy out of $10$ different laptops. He asks his $N$ friends for their recommendation. The $i^{th}$ friend recommends the Chef to buy the ${A_i}^{th}$ laptop $(1 \le A_i \le 10)$. Chef will buy the laptop which is recommended by **maximum** number of friends. Determine which laptop Chef buys. Print `CONFUSED` if there

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start