Johannes Baum
1 min readJun 2, 2020

--

I think my wording was not precise enough here. The graph is not even allowed to have any cycle (not even an undirected one). The graph you are showing does not contain a directed cycle but this condition is not sufficient for DFS.

Thank you for pointing that out. I will rephrase that part.

So for your example graph you can't use DFS.

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

Responses (1)

Write a response