Skip to content

Instantly share code, notes, and snippets.

@kingsleytan
Created October 8, 2019 06:49
Show Gist options
  • Save kingsleytan/c99eb96dc1e8a8080f5a887242fa51dd to your computer and use it in GitHub Desktop.
Save kingsleytan/c99eb96dc1e8a8080f5a887242fa51dd to your computer and use it in GitHub Desktop.
var graph = [
[0, 1, 1, 1, 0],
[0, 0, 1, 0, 0],
[1, 1, 0, 0, 0],
[0, 0, 0, 1, 0],
[0, 1, 0, 0, 0]
];
console.log(bfs(graph, 1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment