Question: PULKIT KHATRI 21BCE2597 Write a python program to find the total number of unique paths that the person can take in a given maze from

 PULKIT KHATRI 21BCE2597 Write a python program to find the total

number of unique paths that the person can take in a given

PULKIT KHATRI 21BCE2597 Write a python program to find the total number of unique paths that the person can take in a given maze from a source to a destination. The maze is constructed by a MxN matrix with values 1' and 'o', where 1's are open cells through which the person can travel and O's are hurdles. Also the person can move up, down, left or right. For example in the given matrix there are 4 possible unique paths. You cannot go back to the previously visited cell. 1 1 1 1 1 1 1 1 0 1 10 1 0 1 [1 1 1.1 [1 1 1 1 1 [1 1 0 1] TO 1 0 1 1 1 1 1 1 ] 1 1 1 1 1 1 T 1 1 0 11 [0 1 0 11 [1 1 1 1] 1 1 1 1 1 1 1 1 0 1 [ 0 1 0 1 1 [TTT 1] Input Format Enter the number of rows M Enter the number of columns N Input Format Enter the number of rows M Enter the number of columns N Enter the MXN values (either 1 or 0) for the maze Enter the x coordinate of source Enter the Y coordinate of source Enter the x coordinate of destination Enter the Y coordinate of destination Output Format Enter the total number of unique path from source to destination case=1 input=44 1 1 1 1 1 101 0101 1 1 1 1 1 1 4 4 output=4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!