Basic summary
1 | 1 function Dijkstra(G, w, s) |
Extract_Min(Q)是提取节点使得这个节点到源节点的距离最小,每次都这么提取。需要计算所有节点的距离因此将Q设成所有节点,如果只需要计算特殊情形Q起始只有一个节点。用PriorityQueue实现res->正则很方便.
变形Dj
BFS,每次不是提取Min_Q节点,仅仅BFS,因为题目要求逐跳之内到达目标节点,层序遍历走到就走到,走不到就停止。每次判断条件仍然是距离向量。
流年匆忙,对错何妨
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true