Assume that I already have a 2D int value[i][j]
. This works well and I can store a single int
in each index. Now I want to add a second array int data[i][j]
so I can store multiple int
data in it. Am I approaching it correctly?
For example in a Sudoku situation:
value[0][0] = 0
But in an other grid I have all possible values in each index
data[0][0] = {1,2,3,4,5,6,7,8,9}
Is it possible to do that? If so what should I do with my data? I'm really confused about arrays, multi-dimensional arrays, ArrayLists, etc. I'm unsure which to use.
For example:
Values {1,2,3},{4,5,6},{7,8,9}
In an 3x3:
1,2,3
4,5,6
7,8,9
Data{1,2,3,4,5,6,7,8,9}
Which I want to store it now in each grid and will have a method to remove from that list in later steps because I'm cancelling those possibilities in that grid. And the data in data{} doesn't have to be shown to the user.