-1
$\begingroup$

If we have a connected, weighted, undirected graph. Can anyone provide an example where DFS will not return the MST? No matter what vertex we start from ?

$\endgroup$
1
  • 1
    $\begingroup$ Please add what you tried to convince yourself that there are no such graphs, or find one. $\endgroup$
    – greybeard
    Nov 15, 2019 at 6:55

1 Answer 1

3
$\begingroup$

Here is one such example of undirected weighted graph.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.