Question: Suppose we represent a graph G having n vertices and m edges with the edge list structure. Why, in this case, does the insertVertex method
Suppose we represent a graph G having n vertices and m edges with the edge list structure. Why, in this case, does the insertVertex method run in O(1) time while the removeVertex method runs in O(m) time?
Step by Step Solution
3.48 Rating (171 Votes )
There are 3 Steps involved in it
Inserting a vertex runs in O1 time sin... View full answer
Get step-by-step solutions from verified subject matter experts
