Hackety Hacking Problem Shortest Path Implemented inC: Difference between revisions
Jump to navigation
Jump to search
(New page: 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 m...) |
No edit summary |
||
Line 1: | Line 1: | ||
== 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 |
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". |
city "i" & city "j".Its value is -1 if there is no direct path between "i" & "j". |
Revision as of 16:57, 16 October 2007
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".