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


    Question

    Which shortest-path algorithm is appropriate for graphs

    with non-negative weights and supports decrease-key efficiently for faster performance?
    A Bellman-Ford Correct Answer Incorrect Answer
    B Dijkstra’s algorithm with binary heap Correct Answer Incorrect Answer
    C Dijkstra’s algorithm with Fibonacci heap Correct Answer Incorrect Answer
    D BFS Correct Answer Incorrect Answer
    E Kruskal’s algorithm Correct Answer Incorrect Answer

    Solution

    Using a Fibonacci heap yields O(E + V log V) for Dijkstra, with faster amortized decrease-key than binary heap.

    Practice Next
    ask-question