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

Method Graph

CPP/BFS GRAPH ALGO/BFS-GRAPH-ALGO.cpp:21–24  ·  view source on GitHub ↗

Create a graph with given vertices, and maintain an adjacency list

Source from the content-addressed store, hash-verified

19// Create a graph with given vertices,
20// and maintain an adjacency list
21Graph::Graph(int vertices) {
22 numVertices = vertices;
23 adjLists = new list<int>[vertices];
24}
25
26// Add edges to the graph
27void Graph::addEdge(int src, int dest) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected