What format are you getting the matrix in..?
If it's a file then for each line all you want to do is find the first '1' and return the position of the number.
...or have I over simplified this..?
Update: I believe Abigail-II is refering to this Dijkstra'a Shortest Path Algorithm or this
-----In reply to Re: The Matrix
by AcidHawk
in thread The Matrix
by nosbod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |