-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
    $\begingroup$ Please add what you tried to convince yourself that there are no such graphs, or find one. $\endgroup$ – greybeard Nov 15 '19 at 6:55
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, privacy policy and cookie policy

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