Question: I have this String array:

```
String[] spltstr = {"a","b","c","d","e","f",...,"z"};

```

And I need to place every value there into an array like this:

```
String[][] matrix;

```

I know the dimensions of both arrays, and as an output I need my matrix to look like:

```
matrix={{"a","b","c","d","e","f"},
        {"g","h","k","l","m","n"},
        {...................."z"}};

```

Can you tell me if this is possible? 
I'm having problems since the dimension of the first array is "n" and the second array is an "m"x5.

If you think there is a better way to get this done I would be thankful.

Answer: 
It is possible.

Think about the mapping.

```
n  (i,j)
0->(0,0)
1->(0,1)
2->(0,2)
3->(0,3)
4->(0,4)
5->(1,0)
6->(1,1)
7->(1,2)

```

etc...

So the idea is to transform n into a pair of (i,j)
well, if you know the sizes of the array, you can write a while loop to populate matrix.

Have 3 variables outside the loop called Row, and Col, and Out. You know that there are X letters per row. So you check in your while loop if you have populated the (X-1)th index of matrix, you update row to row++, and col to 0. Each iteration of the loop, you'll do Col++, as well as Out++. 

Because Row and Col and Out are being updated, you can just set matrix[Row][Col] to equal spltstr[Out].

You'll finish the problem once you run out of letters in the alphabet.