Representing Graphs
Link: https://thepalindrome.org/p/representing-graphs
Context
Edge List: List (tuple) of nodes and optionally weights. Adjacency Matrix: Matrix of each node with the all other nodes, really great way to describe the graph, has everything that is needed to understand about a graph. Adjacency List: Map of each node with a list of nodes that are connected with it, if weighted, then can add a list of tuples representing the node and the weight. A little tricky but the author says this format is the most used and is optimal for general use cases, so seems good enough. The PalindromeRepresenting GraphsHello there…Read more4 months ago · 51 likes · Alberto Gonzalez