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...) |
(cat) |
||
(One intermediate revision by one other user not shown) | |||
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". |
||
Write a program to find the shortest distance between city "A" & city "B". |
Write a program to find the shortest distance between city "A" & city "B". |
||
[[Category: Hackety Lesson Plan]] |
Latest revision as of 20:08, 6 April 2008
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".