Skip to content

Refactor BFS implementation for improved readability and safety#42

Open
Harshit-0018 wants to merge 1 commit intostriver79:mainfrom
Harshit-0018:Harshit0718-refactor-graph-cpp
Open

Refactor BFS implementation for improved readability and safety#42
Harshit-0018 wants to merge 1 commit intostriver79:mainfrom
Harshit-0018:Harshit0718-refactor-graph-cpp

Conversation

@Harshit-0018
Copy link

This PR refactors the BFS implementation to improve readability and code safety
without changing the underlying algorithm.

Changes include:

  • Improved variable naming
  • Replaced int-based visited array with vector
  • Added time and space complexity comments
  • Improved formatting and const correctness

The logic and output remain unchanged.

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