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

Implemented Iterative DFS #45

Closed
wants to merge 2 commits into from
Closed

Conversation

ittou-shura
Copy link
Contributor

Title: Added implementation for Iterative DFS in Java, C++, Python


Issue Link:
Fixes #43

Changes Made:

  • Created a new folder DFS_Iterative/ containing:
    • dfs_iter.java (Java implementation for prefix sum)
    • dfs_iter.cpp (C++ implementation for prefix sum)
    • dfs_iter.py (Python implementation for prefix sum)
    • README.md (Documentation for the DFS_Iterative folder explaining the implementation)
  • Updated RoadMap.md to include a hyperlink to the DFS_Iterative/ folder and checked the relevant box for it.

Checklist:

  • Added code in Java, C++, and Python.
  • Updated RoadMap.md with a checkbox and hyperlink to DFS_Iterative/.
  • Verified all files compile/run without errors.
  • Added meaningful comments and test cases in the code.

@imsuraj675
Copy link
Owner

You don't mark the nodes as visited when they are inserted in stack, they are marked visited when they are popped out of stack

@imsuraj675
Copy link
Owner

Are you working on this issue? If yes, then complete it by tomorrow

@imsuraj675 imsuraj675 closed this Dec 29, 2024
@imsuraj675 imsuraj675 added the invalid This doesn't seem right label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ADD] implement iterative DFS
2 participants