Explicitely specify type of vector during graph instantiation

This commit is contained in:
Anmol3299 2020-06-03 20:40:09 +05:30
parent 8f04ffe3fb
commit 9d8736e79e

View File

@ -292,7 +292,7 @@ class CycleCheck {
*/
int main() {
// Instantiate the graph.
Graph g(7, {{0, 1}, {1, 2}, {2, 0}, {2, 5}, {3, 5}});
Graph g(7, std::vector<Edge>{{0, 1}, {1, 2}, {2, 0}, {2, 5}, {3, 5}});
// Check for cycle using BFS method.
std::cout << CycleCheck::isCyclicBFS(g) << '\n';