ProAlgos / ProAlgos-Cpp

C++ implementations of well-known (and some rare) algorithms, while following good software development practices
MIT License
507 stars 363 forks source link

Breadth-First Search #399

Closed dcyrus closed 3 years ago

dcyrus commented 3 years ago

Breadth-First Search Iterative Implementation using Queue

BFS is a traversing algorithm where you should start traversing from a selected node (source or starting node) and traverse the graph layer-wise thus exploring the neighbor nodes (nodes that are directly connected to the source node). You must then move towards the next-level neighbor nodes.

Time Complexity: O(V+E) Space Complexity: O(V) Where V represents vertices and E represent edges

stale[bot] commented 3 years ago

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.