← All problemsSign in

Social Circles

In a typical social media website, there are various friends of ours, who are common, known as mutual friends. We define a set of users to be a part of a Social Circle $S$, if each friend in that set satisfies the following characteristics: - If $A$ is a friend of $B$, both $A$ and $B$ should belong to the same set. - If $A$ is a friend of $B$ and $C$ is also a friend of $B$ (i.e. $B$ is t

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