Skip to content

Instantly share code, notes, and snippets.

@bogoreh
Created March 3, 2021 07:07
Show Gist options
  • Select an option

  • Save bogoreh/9b6e389dcc874a69dca2ce26a93718b2 to your computer and use it in GitHub Desktop.

Select an option

Save bogoreh/9b6e389dcc874a69dca2ce26a93718b2 to your computer and use it in GitHub Desktop.
var edgeList = [ [0, 2], [1, 3], [2, 3], [2, 4], [3, 5], [4, 5] ];
var adjMatrix = [
[0, 0, 1, 0, 0, 0],
[0, 0, 0, 1, 0, 0],
[0, 0, 0, 1, 1, 0],
[0, 0, 0, 0, 0, 1],
[0, 0, 0, 0, 0, 1],
[0, 0, 0, 0, 0, 0],
];
var adjList = [ [2], [3], [3, 4], [5], [5], []
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment