Add dfs and bfs with optimizations