Question

What is the space complexity of storing an adjacency matrix for a graph with V vertices and E edges?

A O(V)
B O(E)
C O(V + E)
D O(V^2)
E O(E^2)
Practice Next

Hey! Ask a query