added the implementation of bfs and dfs