i am trying to find algorith to solve this kind of problem.
this is how matrix looks
x 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 5
here "X" is starting location, "5" is the final point and "1" is "wall".
the solution should be something like 1D array where index is the "X" coord, and element in the index is "Y" coord.
i should use recursion for this, but i dont know how, so if u can post code or good tip for how to do it, i would be happy.
Aucun commentaire:
Enregistrer un commentaire