adplus-dvertising
frame-decoration

Question

Time complexity to check if an edge exists between two vertices would be ___________

a.

O(V*V)

b.

O(V+E)

c.

O(1)

d.

O(E)

Answer: (d).O(E)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Time complexity to check if an edge exists between two vertices would be ___________

Similar Questions

Discover Related MCQs

Q. The graphs G1 and G2 with their incidences matrices given are Isomorphic.

e1 e2 e3 e4 e5 e6
v1 1 0 0 0 0 0
v2 1 1 0 0 0 1
v3 0 1 1 0 1 0
v4 0 0 1 1 0 0
v5 0 0 0 1 1 1



e1 e2 e3 e4 e5 e6
v1 0 0 1 0 0 0
v2 1 0 1 0 1 0
v3 1 1 0 1 0 0
v4 0 1 0 0 0 1
v5 0 0 0 1 1 1

Q. If a connected Graph (G) contains n vertices what would be the rank of its incidence matrix?

Q. A Graph Structured Stack is a _____________

Q. If a Graph Structured Stack contains {1,2,3,4} {1,5,3,4} {1,6,7,4} and {8,9,7,4}, what would be the source and sink vertices of the DAC?

Q. Graph Structured Stack finds its application in _____________

Q. If in a DAG N sink vertices and M source vertices exists, then the number of possible stacks in the Graph Structured Stack representation would come out to be N*M.

Q. Space complexity for an adjacency list of an undirected graph having large values of V (vertices) and E (edges) is ___________

Q. For some sparse graph an adjacency list is more space efficient against an adjacency matrix.

Q. Time complexity to find if there is an edge between 2 particular vertices is _________

Q. For the given conditions, which of the following is in the correct order of increasing space requirement?
i) Undirected, no weight

ii) Directed, no weight

iii) Directed, weighted

iv) Undirected, weighted

Q. Space complexity for an adjacency list of an undirected graph having large values of V (vertices) and E (edges) is __________

Q. In which case adjacency list is preferred in front of an adjacency matrix?

Q. To create an adjacency list C++’s map container can be used.

Q. Given a plane graph, G having 2 connected component, having 6 vertices, 7 edges and 4 regions. What will be the number of connected components?

Q. Number of vertices with odd degrees in a graph having a eulerian walk is ________

Q. How many of the following statements are correct?
i) All cyclic graphs are complete graphs.

ii) All complete graphs are cyclic graphs.

iii) All paths are bipartite.

iv) All cyclic graphs are bipartite.

v) There are cyclic graphs which are complete.

Q. All paths and cyclic graphs are bipartite graphs.

Q. What is the number of vertices of degree 2 in a path graph having n vertices,here n>2.

Q. All trees with n vertices consists of n-1 edges.

Q. What would the time complexity to check if an undirected graph with V vertices and E edges is Bipartite or not given its adjacency matrix?