Posted inComputer Science Data Structures Graphs
Directed Weighted Graph Edge List Representation
A directed weighted graph can be stored as a pair of lists: every vertex in one list, and every edge as a three-part tuple of start node, end node, and weight. Replacing the node values with indexes into the vertex list lets you jump to those nodes in constant time after you find an edge.
