4 Topics

Member Avatar for
Member Avatar for brandon66

#include <iostream> #include <iomanip> #include <stack> #include <queue> #include <vector> #include <fstream> using namespace std; class graph { public: graph(); graph(int); //graph(int, int); void setEdge(int src, int dst); void printGraph();//print graph void bfs(int);//Breadth First Search void dfs(int);//Depth First Search void bfsSpan(int);//Breadth First Search Spanning Tree void dfsSpan(int);//DepthFirt Search Spanning Tree …

Member Avatar for brandon66
0
516
Member Avatar for dreday92

I am having an issue implementing the Breadth First Search, Im trying to find the shortest distance between the source city and the destination city. Here is what I have so far, Im stuck and dont know what to do about this issue. #include <iostream> #include <string> #include <fstream> #include …

Member Avatar for dreday92
0
215
Member Avatar for IcyFire

I have to write a program that does BFS traversal. My code is mostly correct but i have an error somewhere. it prints repeated numbers in some cases and it's not supposed to. i'm not sure exactly what the problem is. I really hope someone will be able to help …

0
132
Member Avatar for minghags

Hello! I just want to ask you guys if anyone can help me reedit my program from BFS to DFS. I know how BFS works but i can't figure it out how to write the sintax. So i would please ask you guys if you could help me out. Heres …

Member Avatar for Labdabeta
0
420

The End.