Johannes Baum
1 min readJun 11, 2020

--

Actually you bring up a good point. You can still use DFS if the other conditions are met. Namely, if the graph is a tree, there exists only one path from a node to any other node. Therefore that path is also the shortest path and the edge weights do not matter. Thank you for bringing that up Madhuri. I will correct that.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Johannes Baum
Johannes Baum

Written by Johannes Baum

Creator of GridEngine (https://github.com/Annoraaq/grid-engine) 👾 Software Engineer 🚀 JavaScript/TypeScript

No responses yet

Write a response