Java - traverse a 2D matrix diagnoally, above and to the left
<p>I have a matrix </p>

<pre><code>0 0 0 0 0
0 1 1 2 1
0 1 1 2 2
0 1 1 2 3
</code></pre>

<p>So now I would like to understand how to do the following</p>

<p>First go to the bottom right pick up the first no {which is 3} then traverse diagonally, and then pick the {2} but since the no directly above the diagonal 2 is also 2. I would like to create two pointers one to keep a track of the diagonal and the other for the above. </p>

<p>I have got the diagonal code to run, but the code for the directly above one does not work. Can you help me with some ideas?</p>
