ЁЯУв 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
    More Algorithms Questions
    ask-question