mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Explicitely specify type of vector during graph instantiation
This commit is contained in:
parent
8f04ffe3fb
commit
9d8736e79e
@ -292,7 +292,7 @@ class CycleCheck {
|
|||||||
*/
|
*/
|
||||||
int main() {
|
int main() {
|
||||||
// Instantiate the graph.
|
// 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.
|
// Check for cycle using BFS method.
|
||||||
std::cout << CycleCheck::isCyclicBFS(g) << '\n';
|
std::cout << CycleCheck::isCyclicBFS(g) << '\n';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user