AI Coding · Meta · Medium
You are working with a friend-recommendation system that defines a User class: User.id: a unique identifier of type int or string User.currentFriends: a list[User] containing the user's existing friends A buggy function named valid_recommend(user, recommended_users) is provided. It should determine whether the recommendations for user satisfy the required rules. Update the function so that it passes the tests and enforces at least the following: recommended_users must be a…
Checking your access…