Traversing graph
Tips for Exercises 4
We need to avoid infinite loops on cycles
=> We mark visited nodes
We should visit all nodes (not connected graph)
=> Check that you have visited all vertexes
Depth-first search
Breadth-first search
Uses recursion
Similar to traversals on trees
We want to implement DFS method to template class
We can try to implement BFS to template class