Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
}
21
void Graph::addEdge(int src, int dest) {
22
adjLists[src].push_back(dest);
23
adjLists[dest].push_back(src);
24
}
25
26
void Graph::BFS(int startVertex) {
27
visited = new bool[numVertices];
Callers
1
main
Function · 0.45
Calls
1
push_back
Method · 0.80
Tested by
no test coverage detected