← Goldman Sachs questions

People Knowing Each Other

Filed under Goldman Sachs

Given n people and a list of pairs representing friendships where person a knows person b (friendships are transitive: if x knows y and y knows z, then x knows z), find the number of pairs of people…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Goldman Sachs questions

Collected from public candidate posts and coding forums. Updated Nov 2026.