Loading [MathJax]/extensions/tex2jax.js

标签: 图论

2 篇文章

图的存储
1. 邻接矩阵 思想: 利用二维数组 g[N][N] 存储所有的点到点的权值。 其中 N 为点的数量,g[i][j] 表示点 i 到点 j 的权值。 时间复杂度:O(n2)\mathcal{O}(n^2) 空间复杂度:O(n2)\mathcal{O}(n^2) 应用: 只在点数不多的稠密图使用。 大部分情况下点…
3. 基础搜索与图论初识
3.1 简单搜索 分类 DFS BFS A* (BFS+贪心) 双向广搜 双端队列广搜 双向DFS IDDFS (DFS+BFS) IDA* (IDDFS优化) 3.1.1 BFS 思想 当题目需要对一组数据进行扩展式搜索时可以考虑BFS 搜索时要将已经满足要求的点入队 不断地弹出队头,以队头元素进…

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/wp-content/themes/argon-theme-featured/inc/fun/paginate.php on line 22

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/wp-content/themes/argon-theme-featured/inc/fun/paginate.php on line 22