Home - Shortest Path Home filename: home You are excited...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Shortest Path Home filename: home You are excited that you’ve finally learned how to calculate the shortest distances on a map in your Computer Science II class. Now, you want to see if you can apply that knowledge to help you save time. The Problem: Given a list of intersection points, and the distances between each of those intersection points (when riding your bike), determine the shortest distance and path from the intersection designated as your house to another desired intersection. If there are multiple shortest paths, you must take the one that has the fewest edges. You are guaranteed that none of the input maps will have multiple shortest paths with the minimum number of edges. The Input: There will be maps (test cases) in the input file. The first input line contains a positive integer n , indicating the number of maps to be processed. Each map follows. The first line describing a map contains a single positive integer, k , indicating the number of intersection points in the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/09/2009.

Page1 / 2

Home - Shortest Path Home filename: home You are excited...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online