Two Sigma interview question

Friend circle.