小于 1 分钟
Home > @hz-9/algorithm > depthFirstSearchShortestPathString
depthFirstSearchShortestPathString() function
Using Depth-first search algorithm to obtain shortest path information.(Return string) FIXME: The results are not accurate, not recommended for use.
使用深度优先搜索算法获取最短路径信息。(返回字符串) !!!结果不够准确,不建议使用。
Signature:
depthFirstSearchShortestPathString: <T>(graph: Graph<T>, startVertex: T | Vertice<T>, chars?: string) => stringParameters
Parameter | Type | Description |
|---|---|---|
graph | Graph<T> | The graph to traverse. |
startVertex | T | Vertice<T> | The starting vertex for the traversal. |
chars | string | (Optional) The separator between vertices. Default is |
Returns:
string