Suppose we wish to represent an n-vertex graph G using the edge list structure, assuming that we identify the vertices with the integers in the set {0,1, . . . ,n−1}. Describe how to implement the collection E to support O(logn)-time performance for the getEdge(u, v) method. How are you implementing the method in this case?
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.