title: 2 dimension optimal bag ordering (or item placing)
body: <p>The exercise:
  We want to store items in a 2D array (matrix).
  Each item has a height and a width, and the matrix also has these attributes. So a matrix with the <em>height=3</em> and <em>width=2</em> is a <em>matrix[2][3]</em></p>
  
  <p>An example item is: * (4,5)* with means, it's height is 4 and it's width is 5.</p>
  
  <p>Let's see this in an example.</p>
  
  <p>Let us have the list of the items:</p>
  
  <pre><code>listOfItems=[(2,4),(3,2),(1,1),(5,2),(2,2),(2,1)]
  </code></pre>
  
  <p>And let us have a 5x7 size bad (matrix).
  We can store our items defined in the listOfItems in the matrix like this (this is one possible solution):</p>
  
  <pre><code>         1 1 1 1 4 4 6
           1 1 1 1 4 4 6
  Matrix = 2 2 3 0 4 4 0
           2 2 5 5 4 4 0
           2 2 5 5 4 4 0
  </code></pre>
  
  <p>Where the 1st item in our listOfItems had a height of 2 and width of 4, and it has taken place now in the first two rows and first four columns in out bag (in the matrix the item is identified by it's index in the input list). The second item that was a (3,2), can be seend in the left-bottom part of the matrix, and so on. (And there are four open spaces, that has 0-s in the matrix)</p>
  
  <p>For the algorithm, I have the inputs for the height and width of the matrix, the number of incoming items, and the items in the format of " (2 3)".</p>
  
  <p>How should I start?</p>