Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tree.py with Paths to Nodes function. #234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cshamback
Copy link

Added a method called paths_to_nodes, which takes a tree as a parameter and returns an array of all paths from the root node to each other node. This method would be useful for least-cost-path algorithms such as Dijkstra's algorithm, which require the paths between the root and all nodes to be known, not just the paths from the root to the leaves.

  • Cody Shamback

Added a method called paths_to_nodes, which takes a tree as a parameter and returns an array of all paths from the root node to each other node. 
This method would be useful for least-cost-path algorithms such as Dijkstra's algorithm, which require the paths between the root and all nodes to be known, not just the paths from the root to the leaves.

- Cody Shamback
@cshamback cshamback requested a review from liamlundy as a code owner October 8, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant