← All problemsSign in

Social Network

A person X wanted to publicise his website. To do so, he decided to create a post on a social networking site and share it. Every share costed $1 and X had only $1 remaining. When X shared the post on a friend F's profile, the post could be viewed on the profiles of all F's friends ( except X himself ), friends of his friends, friends of friends of friends, and so on. X wanted maximum number of pe

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