pydatastructs icon indicating copy to clipboard operation
pydatastructs copied to clipboard

Implement C++ Backend for Breadth-First Search

Open arvinder004 opened this issue 8 months ago • 1 comments

This pull request introduces a C++ backend implementation for the Breadth-First Search (BFS) algorithm, addressing the need for improved performance, especially when dealing with large graphs as outlined in #674 .

arvinder004 avatar Apr 02 '25 10:04 arvinder004

Hi, I’d love to contribute to this issue with a fresh implementation. I noticed the existing PR (#675) failed all checks, so I’d like to submit a new version with a clean design, full integration, and testing.

🔧 My Approach: I’ll implement the BFS logic in modern C++ (using STL).

Expose it to Python using ctypes (or pybind11 if preferred by maintainers).

Ensure the BFS can handle large graphs efficiently (adjacency list + queue).

Write a wrapper Python function to interact with it.

Add unit tests to validate correctness and coverage.

Make sure it compiles and passes all CI/CD checks.

This will help boost BFS performance in the system and lay the foundation for further native backend features (like DFS, Dijkstra, etc.).

Let me know if you'd like me to proceed or if you have any preferences!

ankitmrj avatar Apr 05 '25 13:04 ankitmrj