compile bfs and dfs, finish iddfs