Kumar-laxmi / Algorithms

A Repository for algorithms in C, C++, Python and Java
Apache License 2.0
310 stars 372 forks source link

Add Breadth First Search (BFS) algorithm in java. #772

Open GOPAL181 opened 1 year ago

GOPAL181 commented 1 year ago

Breadth-first search is a graph traversal algorithm that starts traversing the graph from the root node and explores all the neighboring nodes. Then, it selects the nearest node and explores all the unexplored nodes. While using BFS for traversal, any node in the graph can be considered as the root node.

please assign me this issue

Yash493 commented 1 year ago

Breadth-First Search (BFS) is a graph traversal algorithm that explores all vertices of a graph in breadth-first order, i.e., it visits all the vertices at the same level before moving to the next level. It starts at a given source vertex and explores all the vertices adjacent to the source vertex before moving to the next level of vertices.

I will add the solution of the problem with adequate comments, documentation for readers to get a clear understanding. The solution is to be added in Java

Can you please assign me this issue under SSoC'23?

ishitagithub commented 1 year ago

Greetings , Please assign me this issue under SSOC'23? BFS is a graph traversal algorithm. I can provide algorithm as well as code in Java.