Please help me implement my graph with this function. My graphis using n and p as inputs where n is number of vertices and p isthe probability of adding a new edge. I need to make a new functioncalled check_component_size(graph) which takes as input anundirected simple graph returns a list containing the sizes of allconnected components in the graph.
MY INPUT:
N = int(input(“# of vertices:”)) #taking number of vertices fromuser
P = float(input(“probability of new edge:”)) #take probabilityfrom user
edges = [] #initially edges list is empty
adj = [[] for i in range(N)] #initially the adjancy list is as wellempty
def makeGraph(N,P):
#populating edges with
PayPal Gateway not configured
PayPal Gateway not configured