Skip to content

has-path ​

Guide: /guide/algorithms/graph/has-path

Signature ​

ts
hasPath(graph, from, to, strategy);

Params: ​

NameTypeRequiredDefaultDescription
graphIGraph<T>+Given graph
fromT+Start of path
toT+End of path
strategyIGraphIterationStrategy<T>+BFS/DFS/Dijkstra

data-structures ​

Boolean

Throws: ​

IsNotFoundException when start vertex does not exist ​

IsNotFoundException when end vertex does not exist ​

MIT Licensed