Skip to content

General findPath function #27

@adamjanicki2

Description

@adamjanicki2

One of our use cases is a general findPath function, so I wanted to make an issue to discuss design before diving into implementing it. My thoughts are it should be a function like follows

function findPath(start, end) { ... }

which returns a path of type Array<string | number> to get from start to end. The function should attempt to use parent pointers to climb from end to start, but do a BFS/DFS if no parents are set. Before implementing this, we will need to resolve #26 because in a situation like this where parents aren't necessary but helpful, it would be nice to do a console.warn about it (see end of #26)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions