cheran-senthil / cheran-senthil/PyRival
DFS processing finished nodes
Open
- 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.