Friend Numbers
CodeChefOpen on judge ↗
Problem Definition : It is known that in a group of N friends, each person has a star number. Two friends are best friends if they have the same star number . If the group has an even number of people, everyone has a best friend, if the group is an odd number then one person does not have a best friend . For a given input of star numbers of a group , find the star number of the person who does no
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.
Sign in to chat with the tutor and save your progress.
Sign in to start