Question: - Write a program that ask the user far a file - That file contains a matrix of numbers (only 1,0 and 1 ) -

 - Write a program that ask the user far a file- That file contains a matrix of numbers (only 1,0 and 1

- Write a program that ask the user far a file - That file contains a matrix of numbers (only 1,0 and 1 ) - The first two lines of the file will be the size of the rows and columns - You can assume the data in the file is correct - Your program should stare the values of the matrix af a vectors of int vectors. - Your program should then find a cantinuous path thought the matrix starting at the top left and moving to the botton right 0 The path must have the same number of 1 's and - 1 's. The number of zeros do nat matter - Your program should only move left (col -1), righticol +1 ), up (row -1) and down (row +1). - Your path can only use a pasitian once - If there is such a path in the matrix, that path should be printed to console, using ' A ' for down, 'n' for up, ' > ' for right, ' ' for left, ' x ' where the path ends and '-' for all other positions in the matrix. - You must write a function called path_finder to find the path thought the matrix this function needs be recursive

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!