Let G V E be a directed weighted graph and let us assume th

Let G = (V, E) be a directed, weighted graph and let us assume that the main operation that we are interested in is to determine whether two vertices are connected by an edge in G. Which data structure should be used to represent the graph G such that this operation is implemented efficiently?

A) adjacency-matrix graph representation

B) Binary Search Tree representation

C) adjacency-list graph representation

D) we cannot represent such a graph G

Solution

Answer: Option: A) adjacency-matrix graph representation                                            

                                                                 

Let G = (V, E) be a directed, weighted graph and let us assume that the main operation that we are interested in is to determine whether two vertices are connec

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site