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


    Question

    What is the space complexity of storing an adjacency

    matrix for a graph with V vertices and E edges?
    A O(V) Correct Answer Incorrect Answer
    B O(E) Correct Answer Incorrect Answer
    C O(V + E) Correct Answer Incorrect Answer
    D O(V^2) Correct Answer Incorrect Answer
    E O(E^2) Correct Answer Incorrect Answer

    Solution

    Answer: D) O(V^2)

    Practice Next
    ask-question