Generating grid pattern 2d

I generated a grid, the row starts at bottom left to right and continues to generate as 5*5 grid. But i need a little help in generating grid where pattern should be as,
start row at bottom left to right, right to left. Here is the link to visual, https://dl.dropboxusercontent.com/u/102812893/grid.png How to generate this pattern.
Here is my code.

void drawGrid() 
{
    Vector3 offset = new Vector3(-col / 2.0f + 0.5f, -row / 2.0f + 0.5f, 0.0f); //(-2, -2)
    gameObj = new GameObject[row, col];

    int a = 1, b = 0;

    for(int i = 0; i < row; i++)
    {
        for(int j = 0; j < col; j++)
        {
            gameObj[i, j] = tile;
            b = a++;
            gameObj[i, j].name = b.ToString();
            Vector3 pos = new Vector3(j*0.905f, i*0.905f, 0f) + offset;
            boardPositions.Add(pos);
            //sr.WriteLine(i + "," + j + "=" +pos);
            Instantiate(gameObj[i, j], pos, Quaternion.identity);
        }
    }
}

1 option) You could store your j ints in a List, and after iterating on them, reverseSort or Sort the list. This would probably require a bool that you set as bool = !bool to know which sorting you want (ascending or descending). With this in mind…

  1. You could initiate 2 arrays of j ints, one ascending the other descending, use a bool to switch which one you loop on. This way, you don’t apply a sorting algorithm (which is slow) every loop, but only once at the beginning.

Hope this helps.