Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- See GraphClass.h (http://pastebin.com/dgAgTq8D)
- and GraphClass.cpp (http://pastebin.com/atjfYmhT )
- */
- #include <iostream>
- #include <queue>
- #include <list>
- #include <cstdbool>
- #include "GraphClass.h"
- //using namespace std;
- int main(int argc, char const *argv[])
- {
- // creating graph of 54 vertices
- Graph g(4);
- g.addEdge(0, 1);
- g.addEdge(0, 2);
- g.addEdge(1, 2);
- g.addEdge(2, 0);
- g.addEdge(2, 3);
- g.addEdge(3, 3);
- cout << "Following is Breadth First Traversal (starting from vertex 2) \n";
- g.BFS(2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement