Vidyalelo
Data Structure · all questions

Graph Algorithms (DFS, BFS, Dijkstras, etc)
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

167

Questions

7/9

Page

Pick an option on a question to see the right answer and solution.

Prim's algorithm resembles Dijkstra's algorithm.

Select an option to see the answer and solution.

What is the running time of an unweighted shortest path algorithm whose augmenting path is the path with the least number of edges?

Select an option to see the answer and solution.

Worst case is the worst case time complexity of Prim's algorithm if adjacency matrix is used?

Select an option to see the answer and solution.

Which algorithm is used in graph traversal and path finding?

Select an option to see the answer and solution.

Breadth First Search is equivalent to which of the traversal in the Binary Trees?

Select an option to see the answer and solution.

Regarding implementation of Depth First Search using stacks, what is the maximum distance between two nodes present in the stack? (considering each edge length 1)

Select an option to see the answer and solution.

Floyd Warshall algorithm was proposed by . . . . . . . .

Select an option to see the answer and solution.

The Depth First Search traversal of a graph will result into?

Select an option to see the answer and solution.

What is the time complexity of Kruskal's algorithm?

Select an option to see the answer and solution.

Which of the following is false in the case of a spanning tree of a graph G?

Select an option to see the answer and solution.

Given pseudo code of Dijkstra's Algorithm.
//Initialise single source(G,s)
S=0
Q=V[G]
While Q != 0
    Do u=extract-min(Q)
        S=S union {u}
	    For each vertex v in adj[u]
	        Do relax(u,v,w)
What happens when "While Q != 0" is changed to "while Q>1"?

Select an option to see the answer and solution.

Every graph has only one minimum spanning tree.

Select an option to see the answer and solution.

In Depth First Search, how many times a node is visited?

Select an option to see the answer and solution.

What happens when the value of k is 0 in the Floyd Warshall Algorithm?

Select an option to see the answer and solution.

Which of the following branch and bound strategy leads to depth first search?

Select an option to see the answer and solution.

What is running time of Dijkstra's algorithm using Binary min- heap method?

Select an option to see the answer and solution.

Which of the following data structure is used to implement BFS?

Select an option to see the answer and solution.

Dijkstra's Algorithm run on a weighted, directed graph G={V,E} with non-negative weight function w and source s, terminates with d[u]=delta(s,u) for all vertices u in V.

Select an option to see the answer and solution.

Kruskal's algorithm is best suited for the sparse graphs than the prim's algorithm.

Select an option to see the answer and solution.

In the given graph, identify the path that has minimum cost to travel from node a to node f.
Graph Algorithms (DFS, BFS, Dijkstras, etc) mcq question image

Select an option to see the answer and solution.