Hackety Hacking Problem Shortest Path Implemented inC

From OLPC
Revision as of 16:57, 16 October 2007 by 221.134.239.85 (talk)
Jump to navigation Jump to search

Problem Statement

Hey here is a problem our Defense Base is low on fuel.And there is mission on which AN ARMY TANK is to be sent.The mission is to reach city "B" starting from army base "A" .But there are many routes to move from "A" to "B" .So you have to help them to find the shortest route that will take the TANK from "A" to "B".You are given a two dimensional matrix(array)where a[i][j] gives you the distance between city "i" & city "j".Its value is -1 if there is no direct path between "i" & "j".

Write a program to find the shortest distance between city "A" & city "B".