I want to implement a 2-D array kind of a thing.
What data structure will be most suitable for this? An array or some other data-structure will do. If there is any other data structure which will satisfy my requirement, then please tell me.
I don't want to use an array because the 2-D array needs to be declared early in the program but it is not fixed; the size will be determined at run time.
Also, the number of rows will be equal to the number of columns; this is fixed, because the same name will be given to both the rows and the columns.
I also want to traverse through this 2-D data structure as I would through a Map.