#include
#include
using namespace std;
const int MAX=100;
int adj[MAX][MAX];
bool visited[MAX];
int n;
void dfs(int start)
{
stacks;
s.push(start);
visited[start]= true;
while(!s.empty())
{
int cur = s.top();
s.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 DFS: ";
cin>>start;
cout<<"DFS traversal starting from vertex "<
Comments