MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / addEdge

Method addEdge

BFS in C++/BFS.cpp:21–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 adjLists = new list<int>[vertices];
20}
21void Graph::addEdge(int src, int dest) {
22 adjLists[src].push_back(dest);
23 adjLists[dest].push_back(src);
24}
25
26void Graph::BFS(int startVertex) {
27 visited = new bool[numVertices];

Callers 1

mainFunction · 0.45

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected