Complexities of Graph Operations
Discuss the performance of the two graph representation approaches.
Time complexities
Below you can find the time complexities for the four basic graph functions.
In this table, V means the total number of vertices, and E means the total number of edges in the graph.
Operation | Adjacency List | Adjacency Matrix |
---|---|---|
Add Vertex |
Access this course and 1400+ top-rated courses and projects.