You have a 2D matrix. Only two ZEROs in matrix.
Find the path from 1st zero to 2nd zero with least sum.
1 6 8 9 0 3
4 9 5 5 11 13
8 9 44 23 15 20
7 9 7 13 14 11
0 16 23 31 16 7
67 5 4 23 21 19
Answer
1 6 8 9 0 > 3

4 9 5 5 11 13

8 9 44 23 15 20

7 < 9 < 7 < 13 < 14 < 11

0 16 23 31 16 7
67 5 4 23 21 19