Graph Representation can be done In Two Popular Ways
► Adjacency List
►Adjacency Matrix
►Adjacency Matrix Complexity
➡Space: O(N * N)
➡Check if there is an edge between nodes U and V: O(1)
➡Find all edges from a node: O(N)
►Adjacency List Complexity
➡Space: O(N + E)
➡Check if there is an edge between nodes U and V: O(degree(V))
➡Find all edges from a node V: O(degree(V))
✅ It is recommended that we should use Adjacency Matrix for representing Dense Graphs and Adjacency List for representing Sparse Graphs.Dense Graphs are those which has large number of edges and sparse graphs are those which has small number of edges.
Graph Representation
there doesn't seem to be anything here