User:Jeff/Crossing Streets

Analysis
The input consists of a series of rectilinear line segments. Create a set of x-coordinates and a set of y-coordinates, eliminating the duplicates. Ignore the distances between coordinates, and map the roads out onto a rectangular grid. Calculate the location of the house and school on this grid, and use Dijkstra's algorithm to find the minimum number of roads that need to be crossed (by moving one unit north, south, east, or west at a time).