TheAlgorithms / Ruby

All algorithms implemented in Ruby
MIT License
1.15k stars 289 forks source link

Implementing BFS for unweighted graphs #207

Closed aparibocci closed 1 year ago

aparibocci commented 1 year ago

This PR aims to implement breadth-first search for unweighted graphs, starting at the given node.

The algorithm has a time complexity of O(|V| + |E|), where:

aparibocci commented 1 year ago

Hello @StepfenShawn, could I ask you to have a look at this MR when you have the opportunity?

Thank you in advance!