Suppose that you have a weighted directed graph in which


Suppose that you have a weighted, directed graph in which the out degree and in degree of every vertex is at most 4. (See the previous exercise.) If the graph has n vertices, you could represent it by using an array that has n rows and 4 columns. Each of the n rows is associated with a different vertex in the graph. The entries in a row associated with vertex v are the vertices at the ends of the edges that begin at v. Since the out degree of a vertex can be less than 4, some entries in a row might be null.
What is the Big Oh of each of the following operations?

a. Testing whether two given vertices are adjacent

b. Finding all vertices adjacent to a given vertex

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Suppose that you have a weighted directed graph in which
Reference No:- TGS02209500

Expected delivery within 24 Hours