Replacing two dimensional array with other data structure
<p>I have a complex problem, I don't know whether I can describe it properly or not. </p>

<p>I have two dimensional array of objects of a class. Currently my algorithm operates only on this two dimensional array but only some of the locations of that array are occupied. (almost 40%)</p>

<p>It works fine for small data set but if I have large data set (large number of elements of that 2d array e.g. 10000) then the program becomes memory exhaustive. Because I have nested loops that make 10000 * 10000 = 100000000 iterations.</p>

<p>Can I replace the 2 d array with Hashtable or some other data structure? My main aim is to reduce the number of iterations only by changing the data structure.</p>

<p>Pardon me for not explaining properly. 
I am developing using C#</p>
