Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Adjacency Matrix Help

843785Dec 8 2008 — edited Dec 10 2008
So I have a graph of a bunch of cities connected to other cities. The connections between each city are identified by an integer which would be the price to fly from the source city to the destination. I think using an adjacency matrix would be the best to represent this. I read up on an adjacency matrix and it seems to look exactly like a 2d Array. I wanted to know how this would be implemented, because if I did make a 2d array, how would I get the value of array[san francisco][los angeles]? If there is any confusion as to what I said, please let me know. Thank you, much appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2009
Added on Dec 8 2008
9 comments
299 views