PHP находит кратчайший путь в двумерном массиве, напоминающем лабиринтPhp

Кемеровские программисты php общаются здесь
Anonymous
PHP находит кратчайший путь в двумерном массиве, напоминающем лабиринт

Сообщение Anonymous »


I am working on a 2D string with \n new line at the end.

The maze is 1000 x 1000 but I downscales this to 10 x 5 for the sake of readability.

0 means empty space.

S means starting point.

T means target point.

I created a function called cal_path to calculate the path between S and T. However the result is not correct. I've hard-coded an estimate answer. Any advice/help would be much appreciated.



Источник: https://stackoverflow.com/questions/498 ... like-array

Вернуться в «Php»