Three graph search algorithms:
- Breadth-first-search
bfs
- Depth-first search
dfs
- Dijkstras algorithm
dijkstra
Each function takes three parameters
next: (a: A) => A[]
Thenext
function should take a node and return a list of neighboring new nodes.found: Predicate<A>
Thefound
predicate returns true when we found the nodeinitial: A
The starting node
You can find examples in the packages/core/_examples/ folder