cheran-senthil / cheran-senthil/PyRival

DFS processing finished nodes

Open
#80 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.3k
Forks
307
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
If a node appears several times on the stack, then it will be processed several times in the `else` branch.
https://github.com/cheran-senthil/PyRival/blob/master/pyrival/graphs/dfs.py

**Expected behaviour**
I would expect the implementation to process each node only once after its subtree is finished.
I think it would be suitable to add something like this after line 18:
`if finished[start]: continue`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.