Open your terminal, execute code using following command
cd /cloudCover
node index.js
#----------------------------------------------------------------------------
Input : {"latArray":[0,0,70],"longArray":[90,0,45],"canTravelArray":["2","0 2","0 1"],"start":0,"dest":1}
Output => 9853.078375896708
#----------------------------------------------------------------------------
Input : {"latArray":[0,0,70],"longArray":[90,0,45],"canTravelArray":["1 2","0 2","0 1"],"start":0,"dest":1}
Output => 8141.622797943157
#----------------------------------------------------------------------------
Input : {"latArray":[0,30,60],"longArray":[25,-130,78],"canTravelArray":["1 2","0 2","1 2"],"start":0,"dest":0}
Output => 0
#----------------------------------------------------------------------------
Input : {"latArray":[0,20,55],"longArray":[-20,85,42],"canTravelArray":["1","0","0"],"start":0,"dest":2}
Output => -1