const first_line = [a,b,c,h,e,f,g]
const second_line = [h,i,j,k,m]
const third_line = [o,n,m,p,q]
const fourth_line = [aa,bb,cc,p,dd,ee,ff]
Above is the kind of metro rail arrays with some stations. So I want to know how can I calculate the shortest distance and choose best line to reach there. How i find the shortest route and get all the stations in the array that i need to pass or change trains.
Like a to p or a to ff
Please let me know if anybody can provide me good login of it in javascript
Via Active questions tagged javascript - Stack Overflow https://ift.tt/jC63uEl
Comments
Post a Comment