Skip to content

Refactor DFS implementation for readability and correct indexing#1

Open
Harshit-0018 wants to merge 1 commit intomainfrom
Harshit0718-patch-Dfs-changes
Open

Refactor DFS implementation for readability and correct indexing#1
Harshit-0018 wants to merge 1 commit intomainfrom
Harshit0718-patch-Dfs-changes

Conversation

@Harshit-0018
Copy link
Owner

✔ Fixed node indexing (0-based traversal)
✔ Replaced vector with vector for visited ✔ Improved variable naming (storeDfs → dfsTraversal) ✔ Added time & space complexity comments
✔ Added const correctness
✔ Improved formatting & readability
✔ No change in DFS logic

✔ Fixed node indexing (0-based traversal)
✔ Replaced vector<int> with vector<bool> for visited
✔ Improved variable naming (storeDfs → dfsTraversal)
✔ Added time & space complexity comments
✔ Added const correctness
✔ Improved formatting & readability
✔ No change in DFS logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant