Find the longest route in a 2D array

So, I got this assignment, which I am not sure about as aprroach. I have a 2D array in which some cells are forbidden to visit. Then I need to go through the entire array, choosing the longest route, without entering the forbidden cells. I also can’t “go back” and make another turn, the detour should always go “forward”. The result should be the number of cells visited and in the correct order. The algorithm should be easily scalable, at least for an array with 100x100 cells. Below is an image showing the task.

enter image description here

, : , , , , . . ; 12.

alot , , , , , Djikstras, Bellman-Ford, A * - /. , .

+4

Source: https://habr.com/ru/post/1659986/


All Articles