Skip to content

Data Structures Types.

Graph Non Linear Type

Graph Type Add Vertex Remove Vertex Add Edge Remove Edge Search Path Finding
Directed Graph O(1) O(V + E) O(1) O(E) O(V+E) O(V + E)
Undirected Graph O(1) O(V + E) O(1) O(E) O(V+E) O(V + E)
Weighted Graph O(1) O(V + E) O(1) O(E) O(V+E) O(V + E)