#include
#include
using namespace std;
const int MAX=100;
int adj[MAX][MAX];
bool visited[MAX];
int n;
void bfs(int start)
{
queueq;
q.push(start);
visited[start]= true;
while(!q.empty())
{
int cur = q.front();
q.pop();
cout<>n>>m;
for(int i=0; i>u>>v;
adj[u][v]=adj[v][u]=1;
}
int start;
cout<<"Enter the starting vertices of BFS: ";
cin>>start;
cout<<"BFS traversal starting from vertex "<
Comments