Friend Recommendation

Asked at Meta · Coding Questions · Difficulty: Medium · Last asked Apr 14, 2026

A social network suggests new friends to a user. The `User` class is provided (see the starter code): each user has a `name` and a `friends` set of other `User` objects. Implement three functions that decide which users may be suggested and pick or rank them.

Loading the problem…