- dfs(graph, startIdOrVertex): Generator<Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>, void, unknown> Parameters
- graph: Readonly<{
vertices: IMapImmutable<string, Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>>;
}> - startIdOrVertex: string | Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>
Returns Generator<Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>, void, unknown>
Iterates over vertices from a starting vertex in an depth-first-search