📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Which algorithm guarantees minimum spanning tree and

      will produce a different tree depending on tie-breaking?
      A Prim’s algorithm Correct Answer Incorrect Answer
      B Kruskal’s algorithm Correct Answer Incorrect Answer
      C Both A and B Correct Answer Incorrect Answer
      D Dijkstra’s algorithm Correct Answer Incorrect Answer
      E Bellman-Ford Correct Answer Incorrect Answer

      Solution

      Both Prim and Kruskal produce an MST; if multiple edges have equal weights, different tie-breaking may produce different MSTs (all valid).

      Practice Next
      ask-question