Two Sigma interview question

Find friend circles