
Graph专题
文章平均质量分 89
zhaobaoxue
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
DFS Search with Path Recording
Search solution using dfs while recording the current paths from the root to the current node.原创 2014-09-05 20:58:21 · 531 阅读 · 0 评论 -
Clone Graph
用一个map(unordered_map)保存原始node和新node的对应关系。转载 2014-05-29 16:42:53 · 491 阅读 · 0 评论 -
Graph Traversal (BFS vs DFS vs Stack)
BFS template: (from wiki)1 procedure BFS(G,v) is2 create a queue Q3 create a set V4 add v to V5 enqueue v onto Q6 while Q is not empty loop7 t ← Q.dequeue()转载 2014-09-11 15:56:18 · 844 阅读 · 0 评论