added bfs and dfs algorithms for graph.