Find the biggest rectangle in a bar graph
As others have pointed out, your algorithm is very inefficient. Especially if the size of the columns vary widely:

int[] columns = { 1, 5, 40000, 3 } // Just to make my point clear :-)


This will cause your algorithm to check 39996 numbers (= column heights) for no reason. 

So a minor change in your code could make it a lot more efficient, although it isn't still a very efficient approach:

private int GetBiggestRectSize(List&lt;int&gt; barGraph)
{
  int maxRectSize = 0;
  //int max = barGraph.Max();

  // CHANGE: Instead of checking all values from max to 1 - only check values in the input graph.
  foreach (int i in barGraph)
  {
    int tempSize = 0;
    for (int j = 0; j &lt; barGraph.Count; j++)
    {
      if (barGraph[j] &gt;= i)
      {
        tempSize += i;
      }
      else
      {
        if (tempSize &gt; maxRectSize)
        {
          maxRectSize = tempSize;
        }
        tempSize = 0;
      }
      if (tempSize &gt; maxRectSize)
      {
        maxRectSize = tempSize;
      }
    }
  }

  return maxRectSize;
}