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

Graph DFS #14

Open
epatrizio opened this issue Jan 28, 2022 · 1 comment
Open

Graph DFS #14

epatrizio opened this issue Jan 28, 2022 · 1 comment
Labels
good first issue Good for newcomers

Comments

@epatrizio
Copy link
Owner

For very big graphs, the recursive DFS algorithm can cause a stackoverflow.
Refactoring : while loop without recursive calls -> use a stack (push / pop during vertices visit)

@epatrizio epatrizio added the good first issue Good for newcomers label Jan 28, 2022
@epatrizio
Copy link
Owner Author

This approach is used in BFS algorithm with a queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant