I have to write a program that finds the shortest distance. I'm have a hard time figuring out whats the best way to store the data I have. I have a directed graph with the following cities : San Francisco, Houston, Charleston,New Orleans,Baton rouge,Denver,Pittsburgh,Memphis,Las Vegas,Seattle. Listed below are the cities with their edges and distance from the cities. So From Columbus to Miami is 61 miles. Any suggestion on how to store it ?
Columbus ---> Miami:61, Charleston:408, Las Vegas:689
Miami ---> San Francisco:34, Columbus:61
San Francisco ---> Miami, Houston:485
Houston ---> San Francisco, Memphis:63, Denver:83
Charleston ---> Pittsburgh:36, Memphis:86, Seattle:933, Columbus