Search results for graph-algorithms

31 votes
6 answers
1
The Breadth First Search algorithm has been implemented using the queue data structure. One possible order of visiting the nodes of the following graph is:$\text{MNOPQR}$...
59 votes
7 answers
2
To implement Dijkstra’s shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to be used is:QueueStackHeapB-Tree
63 votes
11 answers
3
61 votes
5 answers
5
65 votes
11 answers
10
In a depth-first traversal of a graph $G$ with $n$ vertices, $k$ edges are marked as tree edges. The number of connected components in $G$ is$k$$k+1$$n-k-1$$n-k$
34 votes
4 answers
20
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?$\theta(n^2)$ $\theta(n^2\log n)$ $\theta(n^3)...