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


    Question

    Which algorithm returns a minimum spanning tree (MST)

    and uses a priority queue to select the next edge connected to the growing tree?
    A Kruskal’s algorithm Correct Answer Incorrect Answer
    B Prim’s algorithm Correct Answer Incorrect Answer
    C Dijkstra’s algorithm Correct Answer Incorrect Answer
    D Bellman-Ford Correct Answer Incorrect Answer
    E Ford-Fulkerson Correct Answer Incorrect Answer

    Solution

    Prim grows an MST from a start vertex, repeatedly adding the minimum-weight edge connecting tree to outside vertices (priority queue used for efficiency).

    Practice Next
    ask-question