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...


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.

Aug 30, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here