Part A: Popular (1.5 Marks)
Write a functionpopular(graph list, n)that returns a list of people who have at leastnfriends. Each person is identified by the number of their vertex.
Input: a nested listgraph listthat represents a graph as an adjacency list, that models the friendships at Monash; and a non-negative integern.
Output: a list of integers, where each integer is a person with at leastnfriends. If no person has at leastnfriends, return an empty list. The list may be in any order.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here