Last active
September 29, 2018 22:52
-
-
Save laran/56a9ed73d220dbeccfe47aa4adf88edd to your computer and use it in GitHub Desktop.
An Edge List representation of a Graph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Each element in the Array represents an Edge between the two Nodes with the IDs in that element. | |
// Every element in the array will have exactly two values. | |
// The indices of the elements in either the inner our outer Arrays have no meaning. | |
let graph = [[1, 2], [0, 3], [1, 3], [2, 0]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment