BFS and DFS algorithms can be used with any graph