I do not mean to be curt, but what have you done? What code have you written? Your question leaves a lot to the imagination. What is 2 & 3 solution? Numbers, coordinates in the matrix?
We will help you fix and understand your code, but we are not here to do your work for you.
It is easy to define a 2D array, but what is in it and how did the information get there and what do you need to do with the information.
FYI when you do post code please put the code between tags which is the <> button to the right under format.