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

Road Block solution #13

Open
varmichelle opened this issue Dec 9, 2016 · 0 comments
Open

Road Block solution #13

varmichelle opened this issue Dec 9, 2016 · 0 comments

Comments

@varmichelle
Copy link
Owner

rblock solution:

  • keep an adj mat with only the shortest path
  • run dijkstra's to find shortest distance between house and barn (make sure to keep track of the edges traversed)
  • iterate over the edges traversed:
    - double each edge individually
    - run dijkstra's to find shortest distance
  • print max distance - original distance
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

No branches or pull requests

1 participant