How can I solve a problem with BFS Algorithm? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can I solve a problem with BFS Algorithm?

I want a code of BFS Algorithm.

2nd Nov 2016, 10:45 AM
Ali
Ali - avatar
2 Answers
+ 2
First of all create adjection list, and then insert them in queue, if you know data structure.
3rd Nov 2016, 9:04 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 1
This is my simple implementation of bfs in c++ using adjacency list https://code.sololearn.com/cn54cie7EYys/?ref=app
29th Mar 2018, 8:54 AM
Bishal Sarang
Bishal Sarang - avatar