2018年2月的全部文章
@kidultff

最短路径 - 迪杰斯特拉(Dijkstra)算法详解

0x00、梗概迪杰斯特拉(Dijkstra)算法是著名用来求最短路径的算法。被用于计算一个点到另一个点的最短路径。其本质是贪心策略,主要思想和广度优先搜索(BFS)差不多,最大的特征是"层层遍历,直到终点"。(Dijkstra算法发明者:艾兹格·W& ...
  • 0
  • 9
@kidultff

js获取地理位置坐标

直接上代码: var show=function(position){         console.log("x="+position.coords.longitude);         console.log("y="+position.coords.latitude ...
  • 0
  • 0
@kidultff

PAT-A 真题- 1021. Deepest Root

原题干:A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root is called the de ...
  • 0
  • 1
@kidultff

寻找那些珍贵的回忆--网页历史记录(快照)查询

转眼间就2018年了,明天就是除夕了。想想在13年前开始接触计算机,用和楼下公用的0.5Mbps的电话线拨号上网,长城牌子的电脑,大屁股显示器,这十多年科技的发展真是快啊...突然想到能不能找回童年的回忆........遂猎奇到了一个很不错的网站,可以 ...
  • 0
  • 8
@kidultff

PAT-A 真题- 1013. Battle Over Cities

原题干:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need to repair any other ...
  • 0
  • 0