Translate C++ Dijkstra to Javascript version

The C++ Dijkstra is at:

http://www.cnblogs.com/tanky_woo/archive/2011/01/19/1939041.html

Calculate the path from 1 to 5!



Here is the Javascript version which is translated from above version:







你可能感兴趣的:(Javascript,javascript,c++,function,c,path)