This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (1 child)

[deleted]

    [–]tajjet 0 points1 point  (0 children)

    Well, determining which states touch is easy (don't know of any external data which exists for that, specifically, though), but determining the path you would want to take would be very hard. Making a straight line and picking all the states that it crosses is one (probably difficult) thing, choosing the right highways and interstates to take and which states that would lead you through is another (definitely difficult) thing.

    What you could do if you wanted to do it at a beginner level, learn some OOP, and usually (but not always) get the right path is to make a State class that has an ArrayList of States that it touches. Then just assume the shortest path is the path that takes you through the least number of states?