If I have an array, eg:
[1, 2, 3, 4, 5, 6, 7, 8, 9]
and I transform this array into an array, eg:
y[0] y[1] y[2]
x[0] = 1 | 2 | 3
---------------
x[1] = 4 | 5 | 6
---------------
x[2] = 7 | 8 | 9
And I have the position of the initial array
, for example the position 5 that in the case is the value -> 6, how do I find the position x, y
of the array equivalent to the position of the array, in the case of this example would be: x:1, y:2
.