DFS code input matrix and output path and point need to get

Job ID: 33388581

Budget: ₹600 – ₹1,500 INR

Given below is the picture of a city as a grid. Due to heavy rains and water clogging,
some paths are blocked for traffic. You are in your office and have to reach home quickly
because of further rain and flood warnings. You have a GPS agent to help you find the
shortest, quickest and safest route through the available paths avoiding the blockades so that
you reach home safely. You are provided with the map of the city with the current situation
marked. Use the following algorithms to find the shortest, and safest path. Use the algorithm
specified below under evaluation details, to find the safest path. Interpret if the path obtained
is the shortest with justification.
Note 1:
No diagonal movements allowed. You cannot pass through other buildings. 5 points to be
added when agent path passes adjacent (next to and not diagonally) to other buildings. 3
points to be detected when agent path passes adjacent to road blocks represented by blocks
with symbol “X”. The path which passes through minimum number of squares and maximum
points is the shortest and safest path.
Related categories: Python Algorithm