Skip to content

Conversation

@monkey0722
Copy link
Owner

This pull request introduces a new Depth-First Search (DFS) implementation for graphs, including both the core DFS functionality and comprehensive unit tests to validate the implementation. The main changes are the addition of the DFS class, which supports various DFS operations, and the corresponding test cases to ensure correctness.

DFS Implementation:

  • src/graph/dfs.hpp: Added a new DFS class template that supports various DFS operations including traversal, recursive traversal, path finding, cycle detection, topological sort, and counting connected components.

Unit Tests:

  • tests/graph/dfs_test.cpp: Added unit tests for the DFS class to validate basic traversal, recursive traversal, path finding, cycle detection, topological sort, counting connected components, and custom node types.…hfinding, cycle detection, and topological sorting

…hfinding, cycle detection, and topological sorting
@monkey0722 monkey0722 self-assigned this Mar 2, 2025
@monkey0722 monkey0722 merged commit ac8b0ab into main Mar 2, 2025
1 check passed
@monkey0722 monkey0722 deleted the feature/dfs branch March 2, 2025 05:19
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.

2 participants